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

Rotation, Values and Changed help?

Asked by 8 years ago

I'm trying to make spinning gears, direction based on status of a value.

--For testing
wait(10)
script.Parent.Parent.Status.Value = "Down"
wait(30)
script.Parent.Parent.Status.Value = "Up"

--------------------------------------------------------------------------------

script.Parent.Parent.Status.Changed:connect(function()
    if script.Parent.Parent.Status == "Down" then
        for i = 1, 360 do
            script.Parent.Rotation = Vector3.new(0, -i, 0)
            wait()
        end
    elseif script.Parent.Parent.Status == "Up" then
        for i = 1, 360 do
            script.Parent.Rotation = Vector3.new(0, i, 0)
            wait()
        end
    end
end)

No errors, and yes the script is enabled. Thanks to whoever helps.

0
use script.Parent.Parent.Status.Value theCJarmy7 1293 — 8y
0
Oh damnit. My stupid brain had a brainfart. TheHospitalDev 1134 — 8y

Answer this question