the title says it all
COMMUNITY QUESTION
Remove tools on click of a brick?
2 answers
Put a click detector in the brick put a script in click detector in script put
script.Parent.MouseClick:Connect(function(p)
local plr = p:GetPlayerFromCharacter()
plr.StarterGear:ClearAllChildren()
plr.Backpack:ClearAllChildren()
end)
Sorry if there's an error I'm on phone.
2 comments
0
umm i think you got this wrong because im pretty sure p is a player not a character
0
andyou would do :getPlayerFromCharacter() on plr:GetPlayers()
Adding on to ReallyUnikatni
script.Parent.MouseClick:Connect(function(plr)
plr.StarterGear:ClearAllChildren()
plr.Backpack:ClearAllChildren()
end)
Make a clickdetector and put the script inside.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Post your code?