I wanted to make a script so if my avatar loaded, my HeadScale would be changed to 4. However, studio responded with an error. Here is the script:
1 | game.Players.PlayerAdded:Connect( function (player) |
2 | player.CharacterAdded:Connect( function (char) |
3 | if player.Name = = "YT_Epiix" then |
4 | local user = game.Workspace:WaitForChild( "YT_Epiix" ) |
5 | user.Humanoid.HeadScale.Value = 4 |
6 | end ) |
7 | end ) |
If you could teach me how to fix this error, I would appreciate it. Thanks!
1 | game.Players.PlayerAdded:Connect( function (player) |
2 | player.CharacterAdded:Connect( function (char) |
3 | if player.Name = = "YT_Epiix" then -- if statements need an end to close them |
4 | local user = game.Workspace:WaitForChild( "YT_Epiix" ) |
5 | user.Humanoid.HeadScale.Value = 4 |
6 | end -- heres the end you need to add |
7 | end ) |
8 | end ) |