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)
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.
Closed as Non-Descriptive by radiant_Light203, CjayPlyz, and JesseSong
This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.
Why was this question closed?