I am trying to make a script that when you step on a block (part) it gives a sword.
✓ ANSWER ACCEPTED
How to make a script that gives you a sword?
2 answers
✓ Accepted answer
script.Parent.Touched:connect(function(t)
player = game.Players:GetPlayerFromCharacter(t.Parent)
if player then
wait()
game.Lighting["Sword"]:Clone().Parent = player.Backpack
end
end)
Hope I helped!
script.Parent.Touched:connect(function(hit)
char = hit.Parent
if char then
wait()
game.Lighting["Sword"]:Clone().Parent = char
end
end)
if ya need it Equipped Automatically...
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Put the script in the brick, if this does not work try using in localscript/regular script whichever you used.
Change the Sword inside the "" to whatever tool. NOTE: It'll work with tools/hopperbins maybe localscripts (KeyDown/KeyUp, etc.)