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:
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
if player.Name == "YT_Epiix" then
local user = game.Workspace:WaitForChild("YT_Epiix")
user.Humanoid.HeadScale.Value = 4
end)
end)
If you could teach me how to fix this error, I would appreciate it. Thanks!

4 comments
You forgot to close the
ifstatement. Add anendaboveend)http://robloxdev.com/articles/Writing-Clean-Code
OP manually removed the end LOL
This is where indenting becomes really handy.