My player’s size doesn’t change and I’m not getting any errors. Why is this haoppening?
local function resizeCharacter(character)
local humanoid = character:WaitForChild("Humanoid")
if humanoid then
humanoid.HeadScale.Value = humanoid.HeadScale.Value * 5
humanoid.BodyDepthScale.Value = humanoid.BodyDepthScale.Value * 5
humanoid.BodyWidthScale.Value = humanoid.BodyWidthScale.Value * 5
humanoid.BodyHeightScale.Value = humanoid.BodyHeightScale.Value * 5
end
end
game.Players.PlayerAdded:Connect(function(player)
local character = player.Character
if character then
resizeCharacter(character)
end
end)
game.Players.CharacterAdded:Connect(function(character)
resizeCharacter(character)
end)
If I’m not wrong, there is no such thing as game.Players.CharacterAdded, instead there is only Player.CharacterAdded
Therefore, the only solution I can think of is moving that part inside the PlayerAdded part.
However, before doing that, try printing around the script to see if everything is running.
“Changing player’s size with this method only works on server side, on client side it wont work.”
Ya that was the point. So it don’t just get hacked. Good luck!
Changing player’s size with this method only works on server side, on client side it wont work. If your doing that on serverside then try adding delay to let character load fully, theres no event “game.Players.CharacterAdded”, you should do it like this:
local function resizeCharacter(character)
local humanoid = character:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid.HeadScale.Value = humanoid.HeadScale.Value * 5
humanoid.BodyDepthScale.Value = humanoid.BodyDepthScale.Value * 5
humanoid.BodyWidthScale.Value = humanoid.BodyWidthScale.Value * 5
humanoid.BodyHeightScale.Value = humanoid.BodyHeightScale.Value * 5
end
end
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
delay(0.1,function()
resizeCharacter(char)
end)
end)
end)