Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago
Edited 5 years ago

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?

0
u mean da CFrame lerp? TheluaBanana 946 — 5y
0
umm no Freddan2006YT 88 — 5y
0
ok then use da CFrame lerp TheluaBanana 946 — 5y
0
Try using a bodyposition kisty1 111 — 5y
View all comments (4 more)
0
Oh thanks lol, i sused for i = 1,2 do y+i Freddan2006YT 88 — 5y
0
ok TheluaBanana 946 — 5y
0
ok Fad99 286 — 5y
0
@freddan2006yt the for loop will shoot it into the sky PoolloverNathan 15 — 5y

Closed as Primarily Opinion-Based by DeceptiveCaster and JakyeRU

This question has been closed because it is a discussion about a topic focused on diverse opinions, which isn't a good fit for our Q&A format.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 5 years ago
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)}
)
0
This uses Tweens to make it bounce! PoolloverNathan 15 — 5y
0
woah! TheluaBanana 946 — 5y
0
@TheluaBanana did I teach u something new? PoolloverNathan 15 — 5y
Ad