So I have an Anti-gravity script that’s supposed to keep the character in the air, but it does this instead.
This is the code used to create the anti gravity.
local function addAntiGravity(model)
local bodyForce = Instance.new("BodyForce")
bodyForce.Name = "AntiGravity"
local totalMass = 0
for _, v in pairs(model:GetDescendants()) do
if v:IsA("BasePart") then
totalMass += v:GetMass()
end
end
bodyForce.Force = Vector3.new(0, totalMass * workspace.Gravity, 0)
bodyForce.Parent = model.PrimaryPart
return bodyForce
end
In the main script I just do,
local antiGravity = addAntiGravity(character) -- this creates and adds the anti gravity to the HumanoidRootPart
You change the position property of the BodyPosition to the position you want the player to be at. You will likely need to tweak some of the other properties to make it to your liking.
D is dampening, P is power. If your dampening is too low, it will move the character more erratically. If your power is too low, the mover will struggle to move the character.