kii55_ALT
|
  |
| Joined: 13 Nov 2016 |
| Total Posts: 63 |
|
|
| 15 Jul 2017 05:54 PM |
| I still havent figuired this out because im dumb but how do you make a gui appear on the screen when a timer finishes? |
|
|
| Report Abuse |
|
|
Noxility
|
  |
| Joined: 04 May 2016 |
| Total Posts: 47 |
|
|
| 15 Jul 2017 05:58 PM |
function starttimer() wait(5) game.Players.LocalPlayer.PlayerGui.UIName:Destroy()
end
script.Parent.MouseButton1Click:connect(starttimer) |
|
|
| Report Abuse |
|
|
Noxility
|
  |
| Joined: 04 May 2016 |
| Total Posts: 47 |
|
|
| 15 Jul 2017 05:58 PM |
| You'd want to make that a local script and put it in a textbutton. |
|
|
| Report Abuse |
|
|
kii55_ALT
|
  |
| Joined: 13 Nov 2016 |
| Total Posts: 63 |
|
|
| 15 Jul 2017 06:00 PM |
| Uhh... Why is mousebutton1click in there? I meant when a timer finished a gui would pop up on your screen |
|
|
| Report Abuse |
|
|
Niveum
|
  |
| Joined: 15 Aug 2009 |
| Total Posts: 3228 |
|
|
| 15 Jul 2017 06:54 PM |
local timer_time = 5
wait(timer_time) local gui = Instance.new("ScreenGui",parent) local tl = Instance.new("TextLabel") tl.Text = "Times up"
you could also use delay if you want other code to run as well
delay(timer_time, function() -- code from above end)
But if your going to be creating a screengui, youll need to run it as a local script in the player/place that local scripts run because server scripts cant access the playergui
~ S P I C Y ~ |
|
|
| Report Abuse |
|
|
Noxility
|
  |
| Joined: 04 May 2016 |
| Total Posts: 47 |
|
|
| 15 Jul 2017 08:55 PM |
| Yeah, use that person's. LOL |
|
|
| Report Abuse |
|
|
kii55_ALT
|
  |
| Joined: 13 Nov 2016 |
| Total Posts: 63 |
|
|
| 15 Jul 2017 09:04 PM |
| Also could i make it so it waits till there are 2 players in the game then run the timer script? |
|
|
| Report Abuse |
|
|
Niveum
|
  |
| Joined: 15 Aug 2009 |
| Total Posts: 3228 |
|
|
| 15 Jul 2017 09:10 PM |
local can_run = true
game.Players.PlayerAdded:connect(function() if #(game.Players:GetPlayers()) >= 2 and can_run == true then can_run = false -- code end end)
take out the can_run stuff if you want it to run more than once, every time 2 or more players are added, change >= to == if you want it to only run when exactly 2 players are present
~ S P I C Y ~ |
|
|
| Report Abuse |
|
|
kii55_ALT
|
  |
| Joined: 13 Nov 2016 |
| Total Posts: 63 |
|
|
| 15 Jul 2017 09:43 PM |
| Thanks Niveum, your a big help. |
|
|
| Report Abuse |
|
|
kii55_ALT
|
  |
| Joined: 13 Nov 2016 |
| Total Posts: 63 |
|
|
| 15 Jul 2017 10:21 PM |
Oh and now ive ran into another problem
player.PlayerGui.ScreenGui1.Enabled = true
its in a local script and it doesnt make screengui1 enabled... |
|
|
| Report Abuse |
|
|