local character = game.Workspace.Player
local player = game.Players:GetPlayerFromCharacter(character)
--This function above will return the object value of the player
--if that character dosen't have a player, it will return nil instead
if player then
print("Player is " .. player.Name)
else
print("Player doesn't exist!")
end
--LOCAL SCRIPT
local char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
-- Player = Stores stuff like you UserId. Its you!- Developers have access to like purchases and so
-- Character = How you look like - The Model in your Workspace
-- Humanoid = A little Robot inside the Character that Holds Values like your Health or WalkSpeed
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(Character)
print(Character.Name)
end)
end)
-- The Character property (of a player) contains a reference to the model in the workspace
local character = Player.Character
-- From there we can get the humanoid root part or whatever
local HRP = character.HumanoidRootPart