Ad
Log in to vote
0

I write a working function but I rewrite it but with different gui and it wont work?

Asked by 7 years ago

Ok so I have this. And MarioLogo and NintendoToSega wont dissapear.

wait(1) player = game.Players.LocalPlayer button = script.Parent

function teleportToArena() torso = player.Character.Torso torso.CFrame = game.Workspace.MarioTP.CFrame end

button.MouseButton1Click:connect(teleportToArena)

local MarioChar = player.PlayerGui.ChooseCharacter.MarioChar

function onClick()
    if MarioChar.Visible then
        MarioChar.Visible = false
    end
end

button.MouseButton1Click:connect(onClick)

player = game.Players.LocalPlayer

local ChooseCharacter = player.PlayerGui.ChooseCharacter.ChooseCharacter

function onClick2() if ChooseCharacter.Visible then ChooseCharacter.Visible = false end end

button.MouseButton1Click:connect(onClick2)

local MarioName = player.PlayerGui.ChooseCharacter.MarioName

function onClick3() if MarioName.Visible then MarioName.Visible = false end end

button.MouseButton1Click:connect(onClick3)

local NintendoToSega = game.StarterGui.ChooseCharacter.NintendoToSega

function onClick4() if NintendoToSega.Visible then NintendoToSega.Visible = false end end

button.MouseButton1Click:connect(onClick4)

local MarioName = game.StarterGui.ChooseCharacter.MarioName

function onClick5()
    if MarioName.Visible then
        MarioName.Visible = false
    end
end

button.MouseButton1Click:connect(onClick5)

local MarioLogo = game.StarterGui.ChooseCharacter.MarioLogo

function onClick6() if MarioLogo.Visible then MarioLogo.Visible = False end end

button.Mousebutton1Click:connect(onClick6)

1 answer

Log in to vote
0
Answered by 7 years ago

make it all 1 function @[email protected] no need for lots

0
then it will work? ILikepie2100 20 — 7y
Ad

Answer this question