local function GetTotalMass()
local mass = 0
for i,v in pairs(workspace.Helicopter:GetChildren()) do
if v.Massless then
return
end
mass = mass + v:GetMass()
end
print('Good! Chopper mass: '..mass)
print("Let's get character mass..")
for i,v in pairs(game.Players.LocalPlayer.Character:GetDescendants()) do
if (v:IsA('BasePart')) or v:IsA('UnionOperation') or v:IsA('MeshPart') then
if (v.Massless) then
return
end
mass = mass + v:GetMass()
end
end
print("Good, now, multiply by gravity, and return.")
print("Total mass = "..mass * workspace.Gravity)
return mass * workspace.Gravity
end
local TotalMass = GetTotalMass()
Force = Vector3.new(1,TotalMass,1)
I’m sure this isn’t your problem, but there are some problems here. First, v.Massless is going to error if Massless doesn’t exist, at least last time I was on the platform. In addition, return will actually stop the function altogether. You should use if v:FindFirstChild("Massless") then mass += v:GetMass() end
I think I have a theory, here you have found the force required to balance the chopper against gravity. It may be going up because of slight errors in the mass. You may need to add more force to make it ascend faster.
Wait, you are applying the vector force here right?
Really sorry, you said you had left roblox, so assuming you’re learning other languages, I thought maybe it had you mixed up. Also i really did not know these existed. (they’re amazing, thank you @varjoy for telling me)