Im trying to connect to the players body but I'm using a player added function and i haven't used roblox studio in a very long time so if u can help it'll be much appreciated
So... So Far I got this
game.Player.PlayerAdded:connect(function(plr) ... end
thanks !?!?!
Well to get the character from a player we can do Player.Character so,
game.Player.PlayerAdded:connect(function(plr) local char = plr.Character or plr.CharacterAdded:wait() -- OR plr.CharacterAdded:wait() because sometimes the character -- might not be there end)
Furthermore we can use the characteradded event of player to do something every time they spawn
game.Player.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) print(char.Name) end) end)
Also you were missing a ) in end, end) , in your code.
Use this.
game.Player.PlayerAdded:connect(function(plr) local character = workspace:WaitForChild(plr.Name) end)
Also, you are lucky that I decided not to moderate your question.