I'm trying to change the character's scale but the character is nil apparently.
My code is here: https://pastebin.com/raw/3x3GDWQz
Can someone help please.
I'm trying to change the character's scale but the character is nil apparently.
My code is here: https://pastebin.com/raw/3x3GDWQz
Can someone help please.
u dont need to do
game.Players.PlayerAdded:Connect(function()
while wait(.5) do
local players = game.Players:GetChildren()
for i = 1, #players do
local Humanoid = players[i].Character.Humanoid or players[i].Character.Humanoid:Wait()
Humanoid.HeadScale.Value = players[i].leaderstats.Height.Value /50 + 1
Humanoid.BodyHeightScale.Value = players[i].leaderstats.Height.Value /50 + 1
Humanoid.BodyWidthScale.Value = players[i].leaderstats.Height.Value /50 + 1
Humanoid.BodyDepthScale.Value = players[i].leaderstats.Height.Value /50 + 1
Humanoid.HeadScale.Value = players[i].leaderstats.Height.Value /50 + 1
end
end
end)
instead make it easier by doing
game.Players.PlayerAdded:Connect(function()
while wait(.5) do
local players = game.Players:GetChildren()--says players = every local player
local Humanoid = players.Character.Humanoid--means ofcourse the local player.Character.Humanoid
Humanoid.HeadScale.Value = players.leaderstats.Height.Value /50 + 1--means local players leaderstats
Humanoid.BodyHeightScale.Value = players.leaderstats.Height.Value /50 + 1
Humanoid.BodyWidthScale.Value = players.leaderstats.Height.Value /50 + 1
Humanoid.BodyDepthScale.Value = players.leaderstats.Height.Value /50 + 1
Humanoid.HeadScale.Value = players.leaderstats.Height.Value /50 + 1
end
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
Character is still nil
huh..
Same error as before.
I think I fixed it. Just need to test it.