Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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)

1 comment

0

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

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.