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

w h y m y s c r i p t d o n t w o r k? [closed]

Asked by 3 years ago
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)
0
where is that script ? i mean at a frame or a button ? MacGames007 114 — 3y

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?

2 answers

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

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.

Ad
Log in to vote
0
Answered by 3 years ago

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.

0
Thats what he did. tamasjonas 62 — 3y