local plr = game:GetService("Players") local Char = plr.Character or plr.CharacterAdded:Wait()
i'm trying to get player's character but it doesn't work.
this is what the error says from the script: " Character is not a valid member of Players 'Players' " Line 2
anyways, this is Server Script
game:GetService("Players")
(similiar to game.Players
) is a folder of all players connected to a server. plr.Character
and plr.CharacterAdded:Wait()
are the properties and events of specific player (not game.Players
!!!). If you run a game, you can see your name in the game.Players
folder, and game.Players.[your_name].Character
and game.Players.[your_name].CharacterAdded:Wait()
will work. Players
and Player
is a big difference, one of wich works like a folder and the second is a player himself