Hello, I'm kinda new to Lua, so if you could be specific as possible, that would be great.
I'm trying to make a script where every time a player spawns, they get a hat, which I've put in ServerStorage. (And yes, the hat works)
Here's what I've tried:
game.Players.PlayerAdded:connect(function(ply) ply.CharacterAdded:connect(function(char) if ply.Name=="iRzPWNzr" or "Player1" then --Player1 is in there for Studio testing game.ServerStorage.DevDominus:Clone().Parent = ply.char end end) end)
Any help is appreciated. Thank you!
You messed up on Line 3 and 4.
game.Players.PlayerAdded:connect(function(ply) ply.CharacterAdded:connect(function(char) if ply.Name=="iRzPWNzr" or ply.Name == "Player1" then --Player1 is in there for Studio testing game.ServerStorage.DevDominus:Clone().Parent = char end end) end)