so i tried to make a ui rotate 360 slowly and it did not work using lerp script:
local hover = true
local plr = game:GetService("Players").LocalPlayer
local main = plr.PlayerGui:WaitForChild("ScreenGui")
function Lerp(a, b, t)
return a + (b - a) * t
end
print("a")
local function render(v)
local s,e = pcall(function()
if hover == true then
v.Rotation = Lerp(v.Rotation, math.cos(tick() * 20) * 20, 0.5)
else
v.Rotation = Lerp(v.Rotation, 0, 0.2)
end
end)
end
game["Run Service"].RenderStepped:Connect(function()
render(main.Main.SideUis.ASettings.cd)
end)