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

How to create a floating block?

How can you create a floating block? like it just slowly goes down and comes back up.

As if something was floating in mid air, nothing is making it happen.

I'm not talking about anchoring either.

1 comment

0

You would use a BodyForce object and set the force to a favorable amount, you would then set the position of that BodyForce object in the script to make it appear to be 'floating'.

1 answer

You would want to use a BodyMover. I would recommend BodyVelocity, because it allows you to apply force to an object/instance, until it reaches a certain velocity. Given that your objective is to have it floating, this instance would be optimal.

The following is an example of how you'd implement it to an object. I will instantiate a Part in the process just for demonstrative purposes.

local part = Instance.new("Part")
part.Parent = workspace

local move = Instance.new("BodyVelocity")
move.maxForce = Vector3.new(0,3e3,0) -- amount of force applied on
-- each axis.
move.Parent = part
move.P = 1000

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