generic image
Processing...
  • Games
  • Catalog
  • Develop
  • ROBUX
  • Search in People
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • ROBUX
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Need help about timers and guis

Previous Thread :: Next Thread 
kii55_ALT is online. 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 is not online. 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 is not online. 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 is online. 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 is online. 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 is not online. Noxility
Joined: 04 May 2016
Total Posts: 47
15 Jul 2017 08:55 PM
Yeah, use that person's. LOL
Report Abuse
kii55_ALT is online. 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 is online. 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 is online. 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 is online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.

Thanks for playing ROBLOX

  • 1

    Click RobloxPlayer.exe to run the ROBLOX installer, which just downloaded via your web browser.

  • 2

    Click Run when prompted by your computer to begin the installation process.

  • 3

    Click Ok once you've successfully installed ROBLOX.

  • 4

    After installation, click Play below to join the action!

    Play
The ROBLOX installer should download shortly. If it doesn’t, start the download now.
generic image