Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Remove tools on click of a brick?

the title says it all

1 comment

0

Post your code?

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.