New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Remove tools on click of a brick? [closed]

Asked by
ahlxs -8
8 months ago

the title says it all

0
Post your code? unsatisfie_d 1459 — 8mo

Closed as Not Constructive by WideSteal321, DinozCreates, and User#24403

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
0
Answered by 8 months ago

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.

0
umm i think you got this wrong because im pretty sure p is a player not a character HappyTimIsHim 164 — 8mo
0
andyou would do :getPlayerFromCharacter() on plr:GetPlayers() HappyTimIsHim 164 — 8mo
Ad
Log in to vote
0
Answered by 8 months ago

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.