I am trying to make a script that when you step on a block (part) it gives a sword.
1 | script.Parent.Touched:connect( function (t) |
2 | player = game.Players:GetPlayerFromCharacter(t.Parent) |
3 | if player then |
4 | wait() |
5 | game.Lighting [ "Sword" ] :Clone().Parent = player.Backpack |
6 | end |
7 | end ) |
Hope I helped!
1 | script.Parent.Touched:connect( function (hit) |
2 | char = hit.Parent |
3 | if char then |
4 | wait() |
5 | game.Lighting [ "Sword" ] :Clone().Parent = char |
6 | end |
7 | end ) |
if ya need it Equipped Automatically...