Skip to content

Instantly share code, notes, and snippets.

@MajorTal
Created June 3, 2025 19:19
Show Gist options
  • Save MajorTal/4dda571ace12131a8fcdabe66f9d757f to your computer and use it in GitHub Desktop.
Save MajorTal/4dda571ace12131a8fcdabe66f9d757f to your computer and use it in GitHub Desktop.
local tool = script.Parent
local event = game.ReplicatedStorage:WaitForChild("GlobalPlaceRequest")
local itemType = tool:WaitForChild("ItemType").Value
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
tool.Activated:Connect(function()
if mouse.Target then
local position = mouse.Hit.p
event:FireServer(itemType, position)
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment