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

Character is nil value?

1 answer

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)

4 comments

0

Character is still nil

0

huh..

0

Same error as before.

0

I think I fixed it. Just need to test it.

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