Still have questions? Join our Discord server and get real time help.
0

# How to make a script that gives you a sword?

I am trying to make a script that when you step on a block (part) it gives a sword.

5
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!

0
Put the script in the brick, if this does not work try using in localscript/regular script whichever you used. fireboltofdeath 630 — 6y
0
Change the Sword inside the "" to whatever tool. NOTE: It'll work with tools/hopperbins maybe localscripts (KeyDown/KeyUp, etc.) fireboltofdeath 630 — 6y
-2
KAAK82 16
6 years ago
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...