I need help with this if you could help I'll be thankful. Thanks!
✓ ANSWER ACCEPTED
How do I make it where when you touch a brick it remove your sword only your sword?
1 answer
✓ Accepted answer
function onTouch(part)
local Player = game.Players:FindFirstChild(part.Parent.Name)
if Player ~= nil then
local Sword = part.Parent:FindFirstChild("Sword")
local SwordInBackpack = Player.Backpack:FindFirstChild("Sword")
if (Sword ~= nil) then
Sword:Destroy()
end
if (SwordInBackpack ~= nil) then
SwordInBackpack:Destroy()
end
end
end
script.Parent.Touched:connect(onTouch)
This should work
6 comments
0
Do I put this in script and put it in a brick?
0
Yes
0
Ok thank you
0
np
0
magemasterhd it didn't work
0
what is the error
This discussion is preserved as it was. New answers, comments, and votes are closed.

6 comments
Where is the sword, In StarterPack? Make sure you add more detail into your questions to help us out.
Also is just just called "Sword"?
Like I want to make it like when the player touches the brick the only thing that disappear is his/her sword. Nothing eles but her/his sword.
Hold on
ok
Here's the deal my friend, you are actually requesting a script right now. This website dosen't alow you to do that.