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

My script can't identify button2 in this boolean i made?

Asked by 3 years ago
Edited 3 years ago
local EEEE = false

game.Workspace.Button.Touched:Connect(function()
    EEEE = true
    if EEEE == true then
     game.Workspace.Button.Touched:Connect(function()
        Instance.new("Part",game.Workspace)
        game.Workspace.Part.Name = "Button2"
        game.Workspace.Button2.BrickColor = BrickColor.new("Really red")
        game.Workspace.Button2.Position = Vector3.new(159.5, -110.5, 32.5)
            game.Workspace.Button2.Size = Vector3.new(5, 1, 5)
            game.Workspace.Button:Destroy()
        end)
    end
end)
EEEE=false

game.Workspace.Button2.Touched:Connect(function()
    EEEE=true
    if EEEE == true then
        game.Workspace.Button2.Touched:Connect(function()
            Instance.new("Part",game.Workspace)
            game.Workspace.Part.Name = "Button3"
            game.Workspace.Button3.BrickColor = BrickColor.new("Really red")
            game.Workspace.Button2:Destroy()
            game.Workspace.Button3.Position = Vector3.new(95.5, -110.5, -149.5)
            game.Workspace.Button3.Size = Vector3.new(5, 1, 5)
            game.Workspace.Button3:Destroy()
        end)
    end
end)


So this seemed good, but when I ran it, the output said 09:34:19.719 - Button2 is not a valid member of Workspace. Please help me!
0
please write this is script form. To do so, highlight the whole script, then press tab BrainDead_Dev 135 — 3y
0
please write this is script form. To do so, highlight the whole script, then press tab BrainDead_Dev 135 — 3y
0
fixed EpicEyeBall_007 25 — 3y

Answer this question