The title speaks for itself. I need the gui to start moving down the parabola after calling the function, but I don’t understand how to do it exactly with gui objects.
There is an example of movement below on the GIF:
The title speaks for itself. I need the gui to start moving down the parabola after calling the function, but I don’t understand how to do it exactly with gui objects.
There is an example of movement below on the GIF:
just have a for loop of whatever you want example
function (x)
return -1 * x^2
end
for i = 1,1000 do
local y = function(i)
gui.Position = Udim2.new(0,x,0,y)
end
Note this isnt the complete code this is idea of how you could do it
Use bezier curve for that:
Here’s how you can do it with gui objects:
local x = nil
local y = nil
local p = script.Parent.p
local p1 = script.Parent.p1.Position
local p2 = script.Parent.p2.Position
local p3 = script.Parent.p3.Position
function lerp()
for i=1,100 do
local d = i/100
x = p1:Lerp(p2,d)
y = p2:Lerp(p3,d)
p.Position = x:Lerp(y,d)
task.wait(0.01)
end
end
lerp()