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

Limiting a Max Rotation?

Asked by 5 years ago

I want to limited this needle gauge to its Normal State What can i do to achieve this?

while wait do
    wait(0.1)
    script.Parent.Rotation = script.Parent.Rotation +0.9
    if script.Parent.Rotation == 55 then do
    script.Parent.Rotation = script.Parent.Rotation -0
end
end
end

Default State: https://gyazo.com/5217a35852b5b468d073759ce5898878

Normal State: https://gyazo.com/a8bb479a139437159c51c2c2a63a4d5a

1 answer

Log in to vote
-1
Answered by
Kullaske 111
5 years ago
Edited 5 years ago
while true do
    wait(0.1)
    if script.Parent.Rotation <= 55 then do
        script.Parent.Rotation = script.Parent.Rotation +0.9
    else
        -- Do what ever it would do once it hits its normal state. 
    end 
end
0
I need it to start from default and stops at its Normal state of rotation from = 0 <> 55 S0NIC_Dev 61 — 5y
Ad

Answer this question