Hi, i was wondering how do i make waving like effect on gui.
I’ve seen one here:
It’s on game called “Raised By Floppa”
Hi, i was wondering how do i make waving like effect on gui.
I’ve seen one here:
It’s on game called “Raised By Floppa”
Use TweenService to smoothly change the Rotation property of a frame.
Bumping this
but what’s the GIF you’re trying to replicate???
it seems to be blank error, recording video would be nice so i can try giving an example.
I fixed the gif, you should see it now
Yea but how to make it go forever
Just put it in a loop. This will go forever until you want it to stop.
By using loops, we can do that.
while wait(.5) do
GUI.Rotation = 5
task.wait(.5)
GUI.Rotation = 0
task.wait(.5)
GUI.Rotation = -5
task.wait(.5)
end)
Or you can do as @imNiceBox said, using tween service
local TS = game:GetService("TweenService")
local info = TweenInfo.new(
1,
Enum.EasingDirection.Quad,
Enum.EasingStyle.In,
0,
false,
0
)
local tween1 = TS:Create(GUI, info, {Rotation = 5})
local tween2 = TS:Create(GUI, info, {Rotation = -5})
while wait(.5) do
tween1:Play()
tween1.Completed:Wait()
tween2:Play()
tween2.Completed:Wait()
tween1:Play()
end)
Tilt the UI intially and use this tween info for the tween.
TweenInfo.new (1, Enum.EasingStyle.Quad,Enum.EasingDirection.Out, -1, true)
first = time
second = EasingStyle
third = EasingDirection
fourth = repeat amount (-1 makes it infinte)
fift = makes it reverse to the intial position.
This would cut down the lines of codes from 9 to 2 for handling the tween.
thank you, it works as i wanted
No problem, just a simple code anyway
You can change its rotation though