I want to make a belly system
Whenever I walk it will go too small and it glitches out my character backwards. And when I eat it will make it go too big and out both sides. I am trying to make it so it grows out 1 side like a stomach.
I have tried these links:
BasePart:Resize()
[Can’t find the Devforum link so here is the code]
local part = --WhereverPartIsLocated
part.Size += Vector3.new(0,0,0.5)
part.CFrame *= CFrame.new(0,0,0.5)
I tried all of these and they didn’t work, I have tried all I could with resizing it on 1 face without moving it so it wont glitch my character backwards. There is no errors in the Console or Output at all, am I doing it wrong by moving it and scaling it. I also do not know how to fix the glitch where it can be bigger than it should or smaller than it should. I also used an accessory for the belly. [Ignore the position of the belly, I will fix that soon!]
--// Part of the EatScript for eating to make it bigger
if Player.Character.Stomache.Handle.Size ~= Vector3.new(Player.Character.Stomache.Handle.Size.X,Player.Character.Stomache.Handle.Size.Y,1.8) then
Player.Character.Stomache.Handle.Size += Vector3.new(0,0,0.2)
Player.Character.Stomache.Handle.CFrame *= CFrame.new(0,0,0.1)
end
--// Part of the shrinking script
local Attachment = Instance.new("Attachment")
Attachment.Parent = Character.HumanoidRootPart
Attachment.CFrame = Character.HumanoidRootPart.CFrame
Attachment.Position = Vector3.new(0,0,0)
Attachment.Name = "BellyAttachment"
local Belly = ReplicatedStorage:FindFirstChild("Stomache"):Clone()
Belly.Handle.Position = Vector3.new(0,0,0)
Belly.Handle.CFrame = Attachment.CFrame
Belly.Handle.Anchored = false
Belly.Handle.CanCollide = false
Belly.Handle.Massless = true
local WeldConstraint = Instance.new("WeldConstraint")
WeldConstraint.Enabled = true
WeldConstraint.Part0 = WeldConstraint.Parent
WeldConstraint.Part1 = Character.HumanoidRootPart
local Humanoid = Character:FindFirstChildWhichIsA("Humanoid")
if Humanoid then
Humanoid:AddAccessory(Belly)
WeldConstraint.Parent = Character.Stomache.Handle
Humanoid.WalkSpeed = 0
Humanoid.JumpPower = 0
end
Hope this was enough information
Regards - Me!