Im trying to create a Height system in a game I’m Developing, however whenever I change the player humanoid’s Scaling (HeadScale, BodyWidthScale, BodyHeightScale, etc), I come across my players head floating above the torso rather than sitting on top. I’m not sure what the problem here is, and I have tried searching for similar things to no avail.
I’m wondering if I could forcibly change how the character’s Head sits on the body, but I havent had any luck with it.
Here’s a few screenshots of the floating head.
Not sure if this will help but here is the code I used to change the Scale.
function module.ResizeCharacter(givenModel,scale)
local Humanoid = givenModel:FindFirstChild("Humanoid")
if Humanoid then
if Humanoid.RigType == Enum.HumanoidRigType.R15 then
print("CHARACTER RESIZER | Rig type R15")
if Humanoid:FindFirstChild("HeadScale") then
--if scale < 1 then -- Shorter
--local HS = Humanoid.HeadScale
local BWS = Humanoid.BodyWidthScale
local BHS = Humanoid.BodyHeightScale
--local rightEyeBlock = givenModel.Head:FindFirstChild("RightEyeBlock")
--local leftEyeBlock = givenModel.Head:FindFirstChild("LeftEyeBlock")
--HS.Value = HS.Value * scale
BWS.Value = BWS.Value * scale
BHS.Value = BHS.Value * scale
--givenModel.Head.CFrame = givenModel.Head.CFrame * CFrame.new(0,50,0)
--rightEyeBlock.Size = rightEyeBlock.Size * scale
--leftEyeBlock.Size = leftEyeBlock.Size * scale
--wait(1)
--leftEyeBlock.CFrame = givenModel.Head.LeftEyeAttachment.WorldCFrame--v.CFrame * CFrame.new(-0.190,0.050,-0.470)
--[[rightEyeBlock.WeldConstraint:Destroy()
rightEyeBlock.CFrame = rightEyeBlock.CFrame --* CFrame.new(0,0,0)
local rightEyeWeld = Instance.new("WeldConstraint")
rightEyeWeld.Parent= rightEyeBlock
rightEyeWeld.Part0 = rightEyeBlock
rightEyeWeld.Part1 = rightEyeBlock.Parent
rightEyeBlock.CanTouch = true
rightEyeBlock.CanCollide = false
]]
--end
else
error("Not compatible character (BodyScale missing)")
return
end
else
--Some stuff not related
Side note: Regardless of if HeadScale is turned on or off doesnt change the problem.
Side note 2: Everything Commented out is stuff not needed, I just commented it out incase I wanted to use it later without having to retype it.
Been at this all day. Help appreciated