Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

StarterPack/localscript, change players properties not working, why?

local playername = game.Players.LocalPlayer
local playercharacter = playername.Character

game.Workspace.playercharacter.Head.BrickColor = BrickColor.new("Lime green")

1 answer

✓ Accepted answer

The character takes longer to load than the LocalScript, so you have to wait for it.

local plr = game.Players.LocalPlayer
local char = plr.Character or pr.CharacterAdded:Wait()
local head = char:WaitForChild("Head");

head.BrickColor = BrickColor.new("Lime green")

######Note.. this is only going to happen for the person playing. Find out more here

3 comments

0

Typo with plr

0

thanks matt, a great help

0

Thanks matt!!

This discussion is preserved as it was. New answers, comments, and votes are closed.