for i, p in pairs(model:GetDescendants()) do
if p:IsA("BasePart") then
local Vel = Instance.new("BodyVelocity")
Vel.Velocity = Vector3.new(0, 0, 0)
Vel.Name = "Velocity"
Vel.MaxForce = Vector3.new(4000, 4000, math.huge)
Vel.Parent = p
_S.CollectionService:AddTag(Vel, "VelocityObject")
end
end
So...
I have a train for going into the glitchlands (blab blab blab)
So this portion of a regular script creates BodyVelocitys on all of the parts in the script, of which are meant to keep the train mid-air when the support is removed, and to later propel the train into the Glitchlands...
But for some reason:
The train just goes flop!
And that's even if I replace the code there with this!
for i, p in pairs(model:GetDescendants()) do
if p:IsA("BasePart") then
local Vel = Instance.new("BodyVelocity")
Vel.Velocity = Vector3.new(0, 50, 0) * p:GetMass()
Vel.Name = "Velocity"
Vel.MaxForce = Vector3.new(4000, 4000, math.huge)
Vel.P = 500000000
Vel.Parent = p
_S.CollectionService:AddTag(Vel, "VelocityObject")
end
end
And I can confirm the BodyVelocitys function later on in the script (partially): when the BodyVelocitys are set to propel the train, they do propel it.
So yea, what the heckies?
Shouldn't the BodyVelocitys keep the train mid-air?
(FYI, the train is kept in a Model, and has multiple folders for organization.)
EDIT: nvm just needed to increase max force
