Title is self explanatory, I just want my part to float in the air so it can spin using torque as an alternative to a while true loop for spinning.
Use a VectorForce to counteract the force of gravity. Use the world-famous F=MA equation to calculate your force
U mind telling what the force would be set to in this case?
Did I not? I told you to use F=MA
ngl idk physics like that… I tried setting the y value of the vectorforce to -196.2 but nothin happening
It’s a kinematic equation. One of the simplest equations you’ll find in all of physics. Google it to understand what its components are
Got it, I’ll see what I can do
You can use an align position. That would be the easiest way to do it.
Also if you just want it to spin without being affected by outside forces you should really just use RunService with CFrames. It’d be better performance wise.
you could constrain it to an anchored part so it won’t move
That would be less laggy than this?
while task.wait() do
script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0,0.7,0)
end
(The script above doesn’t necessarily lag the game, but I feel like there could be a better practice)
This is not ideal because the velocity will keep increasing forever, which could make the part appear more jittery over time. You need to use physics movers like AlignPosition or BodyGyro.
What are you trying to do? Make a part spin in mid air with physics? You can study models like this in the toolbox to figure out how they do it.
It’s really just for a vfx slash, it isn’t even in the workspace for too long. I was mainly looking for an alternative to the spin script I’m using
Well, if it’s not physics based, you should use RunService.RenderStepped to update the rotation. Or you may use TweenService, if it has a simple predictable animation.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.