✓ Accepted answer
First, make sure this is a Server Script inside of ServerScriptService.
Now let me re-write your code;
game.Players.PlayerAdded:Connect(function(p)
p.CharacterAdded:Wait()
wait(5)
local CT = game.Lighting:WaitForChild("SkullSword"):Clone()
CT.Parent = p.Backpack
end)
Try this code. It may or may not solve your problem. I don't see any other problems here. Here's a few stuff you can do if it still doesn't work;
- Make sure you got the name of the sword correct
- Add variables for the sword
- change the location of "SkullSword" to
ReplicatedStorage
- re - write your code
I'm sure one of these should help.
Good luck and have fun developing!
2 comments
you could just put "skullsword" in starterpack
i need it to wait 5 secs then it gives the item i am making a knife game..