Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Player Head Size Script Not Working?

Asked by 6 years ago

I made a local script so that when you join the game your player's head will be size 2. Whenever I run the script code from the command bar it works fine, but it's not working in the script form.

game.Players.LocalPlayer.Character.Humanoid.HeadScale.Value = 2

Nothing goes to output since it's a local script. What did I do wrong?

1 answer

Log in to vote
0
Answered by
Eqicness 255 Moderation Voter
6 years ago

Hello,

This basic code is formatted right, but if your game is Filtering Enabled other players won't be able to see the changes and if you're not receiving errors from your local script that's very strange.

When does your local script run this code? If it runs it right away, your player does not have a character yet resulting in nothing changing and your script should throw an error. Here's how you should probably get the character:

local character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()

If it runs it later on and the player does have a character, try using the method :WaitForChild() to get your humanoid and HeadScale.

Hope you get something from this,

Eqic.

Ad

Answer this question