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

Trying to make a object float what's the best way to do this? [SOLVED]

So i made a cloud and i want it to move it slowly up and down so like its's kinda floating what's the best way to do this. I tried CFrame but it wasn't so effective any help?

8 comments

0

u mean da CFrame lerp?

0

umm no

0

ok then use da CFrame lerp

0

Try using a bodyposition

0

Oh thanks lol, i sused for i = 1,2 do y+i

0

ok

0

ok

0

@freddan2006yt the for loop will shoot it into the sky

1 answer

✓ Accepted answer
yourFloatingObject = -- set this to your cloud
floatDuration = 5 -- set this to how often you want the cloud to float
floatHeight = 5 -- how high should the cloud go?
teenDna = TweenInfo.new(
    floatDuration,
    Enum.EasingStyle.Linear,
    Enum.EasingDuration.Out,
    -1,
    true,
    0
)
teen = game:GetService("TweenService"):Create(
	yourFloatingObject,
	teenDna,
	{Position:yourFloatingObject.Position + Vector3.new(0,floatHeight,0)}
)

3 comments

0

This uses Tweens to make it bounce!

0

woah!

0

@TheluaBanana did I teach u something new?

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