Created
June 3, 2025 19:19
-
-
Save MajorTal/4dda571ace12131a8fcdabe66f9d757f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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