I am trying to access the character model in game.Workspace, but I am not able to accomplish this. How may I do this task?
✓ ANSWER ACCEPTED
How to access the player character from a Local Script?
1 answer
✓ Accepted answer
First you need to get the player
local player = game.Players.LocalPlayer
and then you get the character
local character = player.Character or player.CharacterAdded:Wait()
You need to use CharacterAdded:Wait() to make the script wait until the character is loaded. If you don't do it then the character variable may be nil.
2 comments
0
Aight man, thanks, I tried this many times and made adjustments but it didn't work, I'll try it this way
0
Aight thanks man, this worked.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
game.Players.LocalPlayer.Character
workspace:WaitForChild(game.Players.LocalPlayer.Name); Kappa