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

Intro GUI not working help??

Asked by 10 years ago

I am making a game similar to Darkness, but only WAY different. I'm using GUIs for my main start screen, but when I put the script o that when the player clicks it, the script doesent work. The gui just stays. Im not an expert scripter, so this is probably wrong.

gui = game.StarterGui.IntroGui

function OnClicked()

wait(3)

gui.destroy()

Probably wrong, someone fix my errors please?

3 answers

Log in to vote
0
Answered by 10 years ago
local gui = game.StarterGui.IntroGui
local button = game.StarterGui.Button --Change this to your button
button.MouseButton1Down:connect(function()
    gui.destroy()
end

0
This didnt work. blockhaak2 1 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

You didn't define what OnClicked was

For the answer above me, what type of script did you put it in? LocalScript or Script? Try both.

Log in to vote
0
Answered by
dreamy67 135
10 years ago

Also, Im sure its :Destroy() not .destroy()

Answer this question