|
| 05 Aug 2014 01:53 PM |
I want a GUi button to appear in 110 seconds
but how?
i tried this:
local screenGui = Instance.new("ScreenGui") screenGui.Parent = script.Parent -- Create TextButton local textButton = Instance.new("Button") textButton.BackgroundTransparency = 1 wait(110) textButton.BackgroundTransparency = 0
-- Bind function to button click textButton.MouseButton1Down:connect(function() textButton.Text = "I've been clicked!" end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 Aug 2014 01:56 PM |
Oh wait here:
function onPlayerEntered(player)
local screenGui = Instance.new("ScreenGui") screenGui.Parent = script.Parent
local textButton = Instance.new("Button") textButton.BackgroundTransparency = 1 wait(110) textButton.BackgroundTransparency = 0 end
|
|
|
| Report Abuse |
|
|
|
| 05 Aug 2014 01:56 PM |
local textButton = Instance.new("Button")
Should be
local textButton = Instance.new("TextButton")
and you forgot
textButton.Parent = script.Parent
also make sure
script.Parent = game.StarterGui |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2014 01:59 PM |
like this?
function onPlayerEntered(player)
local textButton = Instance.new("TextButton") textButton.Parent=script.Parent
script.Parent=game.StarterGui
textButton.BackgroundTransparency = 1 wait(110) textButton.BackgroundTransparency = 0 end
And this is a localscript, should it just be a normal script? And the script is inside of the screenGui not in the button, should it be somewhere else? |
|
|
| Report Abuse |
|
|