local turn = false
local activation = script.Parent.Parent.Activation
script.Parent.MouseButton1Click:Connect(function()
if activation.Value == false then
if turn == false then
turn = true
activation.Value = true
script.Parent.Frame.Visible = true
wait(1)
turn = false
end
end
end)
script.Parent.Frame.Off.MouseButton1Click:Connect(function()
if turn == false then
turn = true
wait(1)
activation.Value = false
script.Parent.Frame.Visible = false
turn = false
end
end)
✓ ANSWER ACCEPTED
w h y m y s c r i p t d o n t w o r k?
2 answers
✓ Accepted answer
You may try using BooleanValue since true and false are not string,numbers,cframe,vector3 and ray, but they are booleans. BooleanValue is for booleans so try to use that instead. (Update):Is the script inside any gui button? Also, if you needed it to show it turning, there's no such thing as a turn property.
You put an if statement on line 7 after a then statement on line 6. You need to finish the then statement on line 6 until you can move on to your next if statement on line 7.
1 comment
0
Thats what he did.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
where is that script ? i mean at a frame or a button ?