game.ServerStorage.Sword:Clone().Parent = game.Players:GetPlayerFromCharacter(part.Parent):WaitForChild("StarterGear")
No such thing as a StarterGear, its called a Backpack. I find your code looks cleaner if you put that code in two lines. Basically, you make a variable, then Parent it. That's up to you, though. Keep in mind, this script would only work if it's in a .Touched
function and the parameter is called part.
Also, something else to keep in mind is that you **cannot **access ServerStorage
through a localscript
since it's only accessible through the server. In this case, you can use ServerStorage as you aren't using a localscript
game.ServerStorage.Sword:Clone().Parent = game.Players:GetPlayerFromCharacter(part.Parent):WaitForChild("Backpack") --My way local clone = game.ServerStorage.Sword:Clone() clone.Parent = game.Players:GetPlayerFromCharacter(part.Parent):WaitForChild("Backpack")