I'm attempting to make a character float. Here is my script
function getMass(model) local weight = 0 if model:IsA("BasePart") then return model:GetMass() end if #model:GetChildren()>0 then for _,v in pairs(model:GetChildren()) do weight = weight + getMass(v) end end return weight end game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) local character=player.CharacterAppearanceLoaded:Wait() local mass = getMass(character) local force = Instance.new("BodyForce",character.LowerTorso) force.force = Vector3.new(0,196.2*getMass(character),0) end) end)
I'm adding a force in the lower torso equal to 196.2 * the total mass of the character including hats etc. It seems that's too much and the character is rising. I have no idea why.