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

How can i make the player change his body size by eating something?

How can i make the player change his body size to become bigger in a simulator just like in Fat Simulator where the player has an bigger tummy if he eats food?

I searched on youtube but nothing.Do i have to change the player and add him another object to group it with him or something like that?Because i only need to know how to change his witdhs torso when he eats.

Any help is good!

2 answers

Inside the tool, once they are done with the animation for eating it, add this code:

local humanoid = script.Parent.Parent:FindFirstChild("Humanoid")
local playerWidith = humanoid:FindFirstChild("BodyWidithScale")
local playerHeight = humanoid:FindFirstChild("BodyHeightScale")
local playerDepth = humanoid:FindFirstChild("BodyDepthScale")
local playerHead = humanoid:FindFirstChild("HeadScale") --Remove this if you want shrunken heads >:)

if playerWidith and playerHeight and playerDepth and playerHead then --Check just in case
	playerWidith.Value = playerWidith.Value + 1
	playerHeight.Value = playerHeight.Value + 1
	playerDepth.Value = playerDepth.Value + 1
	playerHead.Value = playerHead.Value + 1
else
	local player = script.Parent.Parent:GetPlayerFromCharacter()
	player:Kick() --They are likely a hacker, so kick them
end

If you ever want to restore the character to the originial size, add:

local humanoid = script.Parent.Parent:FindFirstChild("Humanoid")
local playerWidith = humanoid:FindFirstChild("BodyWidithScale")
local playerHeight = humanoid:FindFirstChild("BodyHeightScale")
local playerDepth = humanoid:FindFirstChild("BodyDepthScale")
local playerHead = humanoid:FindFirstChild("HeadScale") --Remove this if you want shrunken 

playerWidith.Value = 1
playerHeight.Value = 1
playerDepth.Value = 1
playerHead.Value = 1

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