Cant get tornado siren to spin

I wish to make a tornado siren do the little spinny spin thing. However, i cannot get the script that allows for the siren to rotate to pick up the value, it will only go to the “else” block line of code.

while true do
if script.Parent.Enable == true then
script.Parent.Parent.Body.Main.Anchored = false
else
script.Parent.Parent.Body.Main.Anchored = true
end
end

The hingeconstraint is always set to appropriate velocity, im using anchors to stop the rotation.
Capture
(the body is where the anchored part is, it is not by default anchored.)
Ive tried a few solutions, all just changing the hingeconstraint enabled property, the bodies anchored property, and the angularvelocity of the hinge (its a motor)
Ask me any questions if you think i wasnt descriptive enough.

Try this script.

local Motor = script.Parent.Motor -- the part you wanna spin
local RPM = 0.05 -- speed

while task.wait() do

Motor.CFrame = Motor.CFrame * CFrame.Angles(RPM, 0, 0) -- the spinning part

end

I would much rather to stick to the current script, I just need to get it to pick up the value, It goes straight to the else block.

In the second line, you’re currently checking if the instance equals true instead of if its value equals true.
It should be :
if script.Parent.Enable.Value == true then
Hope this helps.

2 Likes

Oh my gosh. How could i forget that. Thanks