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!
You have to change the character scaling. An easy way to do this is using the HumanoidDescription system as shown here: https://developer.roblox.com/en-us/articles/humanoiddescription-system#change-an-existing-character-s-scale
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