So basically what im trying to do is give a player a sword on the event of touching a part. I tried running this script and it didn't work (stopped on the function part). Could someone help me understand what i did wrong and how to fix it?
local sword = game.ReplicatedStorage.ClassicSword local swordgiver = script.Parent local player = game.Players.LocalPlayer
swordgiver.Touched:Connect(function(hit) sword:Clone().Parent = player.Backpack wait(.5) print('sword has been given') end)
