game:GetService("RunService").Heartbeat:Connect(function(deltatime)
local v = script.Parent.AssemblyLinearVelocity.Magnitude
local centripetalforce = (v^2)*script.Parent.BodyAngularVelocity.AngularVelocity.Y*(script.Parent.Mass)*1
-- /(4/(math.cos((math.pi/2)-script.Parent.BodyAngularVelocity.AngularVelocity.Y)))
local vel = script.Parent.CFrame:VectorToObjectSpace(script.Parent.AssemblyLinearVelocity)
if script.Parent.AssemblyLinearVelocity.Magnitude <100 then
--script.Parent.VectorForce.Force = Vector3.new(centripetalforce,0,script.Parent.Mass*100)
script.Parent.VectorForce.Force = (script.Parent.CFrame.RightVector*centripetalforce)+(script.Parent.CFrame.LookVector*script.Parent.Mass*10)
else
--script.Parent.VectorForce.Force = Vector3.new(centripetalforce,0,0)-(vel*script.Parent.Mass*10)
script.Parent.VectorForce.Force = (script.Parent.CFrame.RightVector*centripetalforce)-(script.Parent.AssemblyLinearVelocity*script.Parent.Mass*10)
end
end)
so basically the centripetal force becomes too strong at high speeds.
The equation for centripetal force is f = (mv^2)/r
It looks like you have v^2 and m but I don’t think you need the angular velocity, and you will need to divide by r, the radius of the circle that script.Parent is traveling in.