The code below works properly, but if the player resets or dies, they're not able to receive the weapon again even if they step on the brick. I know why it doesn't work, and that's because I'm using the PlayerAdded event. The reason I'm posting this is because I only know how to make the script this way, and I know for a fact that it's possible to make the script without using PlayerAdded. So, let's cut to the chase:
game.Players.PlayerAdded:connect(function(player)
debounce = false
game.Workspace["Sword Giver Block"].Touched:connect(function(give)
if debounce == true then return end
debounce = false
game.Lighting.ClassicSword:Clone().Parent = player.Backpack
debounce = true
end)
end)
Is anyone willing to show me how to make it without using PlayerAdded?

1 comment
Thank you so much!