Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tool = script.Parent
- local click = script.Parent.Handle.ClickDetector
- local maxActivation = 15 -- max activation distance
- -- functions
- click.MouseClick:Connect(function(player)
- tool.Parent = player.Character -- put the tool in the players character when clicked
- click.MaxActivationDistance = 0
- end)
- workspace.ChildAdded:Connect(function(v) -- check if the tool was dropped
- if v == tool then -- check if the item dropped was the tool
- click.MaxActivationDistance = maxActivation -- make it clickable again
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment