Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make this levitation script make the brick stay in one place?

I'm trying to make a game, it has a brick you stand on, and it is supposed to levitate in one place. I can't just make that one part, it is supposed to stay in one XYZ and goes where-ever with the rotation. Help please.

for i=1, math.huge do
script.Parent.Velocity = Vector3.new(x,3.45,y)
wait(0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001)
end

Thank you!

1 comment

0

wait will always wait at least (by default) a thirtieth of a second. Just write wait() or wait(0) if you want it to go as fast as possible. If you're going to use pointlessly small numbers, maybe try using exponential notation: 1e-269

1 answer

✓ Accepted answer

Use BodyPosition. Set the position value to where you want the part to stay, and make the maxforce extremely high.

Also, wait() has a minimum wait period, being 0.03. If you set it to anything below that, it'll just default to 0.03. So instead of your long line, just use wait()

5 comments

0

Thank you for the help!

0

No problem.

0

Actually, wait() is 0.029999999999999999999999999999999999999999999999. But basically it's 0.03

0

@LordDragonZord: print(0.029999999999999999999999999999999999999999999999 == .03) --> true. Doubles don't have high enough precision to notice a difference.

0

Especially with servers and clients running at different speeds.

This discussion is preserved as it was. New answers, comments, and votes are closed.