DewTie
|
  |
| Joined: 08 Nov 2014 |
| Total Posts: 683 |
|
|
| 30 Apr 2016 09:38 AM |
Ok so this script is for an intermission countdown Everything works just that the gui text doesn't change it only changes the text in the properties but not on the gui i'm not sure why this isn't working because iv'e been using this for a long time
Script: main = game.StarterGui.ScreenGui.MainGUI while game.Players.NumPlayers < 0 do main.Text = "3 players are need to start the game" repeat wait(2) until game.Players.NumPlayers >- 0 end for i = 20,0,-1 do wait(1) main.Text = "Intermission "..i end |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2016 09:57 AM |
Uhm.. First of all, your " while game.Players.NumPlayers < 0 do main.Text = "3 players are need to start the game" repeat wait(2) until game.Players.NumPlayers >- 0 end"
is completely unnecessary.
That should be replaced with:
if game.Players.NumPlayers<3 then main.Text='3 players are needed to start the game.' repeat wait(2) until game.Players.NumPlayers>=3 end
|
|
|
| Report Abuse |
|
|
DewTie
|
  |
| Joined: 08 Nov 2014 |
| Total Posts: 683 |
|
|
| 30 Apr 2016 09:58 AM |
i know its 0 i just leave it there to test stuff in studio so the text won't be 3 players are needed to start the game |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2016 09:58 AM |
Second, if your properties are showing that the text is changing but you cannot see it change, then another gui element must be overlapping the displaying textlabel.
|
|
|
| Report Abuse |
|
|
|
| 30 Apr 2016 09:58 AM |
My point wasn't 0, my point was that you used a useless "while" loop that could cause lag/wasn't even utilized, as 2 loops aren't needed in there. Just one.
|
|
|
| Report Abuse |
|
|
DewTie
|
  |
| Joined: 08 Nov 2014 |
| Total Posts: 683 |
|
|
| 30 Apr 2016 10:00 AM |
nothing is overlapping the text label
|
|
|
| Report Abuse |
|
|
|
| 30 Apr 2016 10:04 AM |
Then your text transparency is 1, or your textcolor is the same as the background. If the properties show something is changed, there is literally no possible way that it isn't changing.
|
|
|
| Report Abuse |
|
|
DewTie
|
  |
| Joined: 08 Nov 2014 |
| Total Posts: 683 |
|
|
| 30 Apr 2016 10:07 AM |
| well i guess we got a problem cause my transparency is 0 and the only gui i have is the text label |
|
|
| Report Abuse |
|
|
DewTie
|
  |
| Joined: 08 Nov 2014 |
| Total Posts: 683 |
|
|
| 30 Apr 2016 10:10 AM |
| I'll just do something don't worry about it |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2016 12:57 PM |
try putting the label in a frame
|
|
|
| Report Abuse |
|
|
|
| 30 Apr 2016 01:23 PM |
Beginner's GUI mistake. Everything in StarterGui is copied to the PlayerGui when the Character spawns, everything that you want instantly updated must be changed from there.
Assuming this is a local script.
main = game.Players.LocalPlayer.PlayerGui.ScreenGui.MainGUI if game.Players.NumPlayers < 3 then main.Text = "3 players are needed to start the game" repeat wait(2) until game.Players.NumPLayers >= 3 end
for i = 20,0,-1 do wait(1) main.Text = "Intermission "..i end
|
|
|
| Report Abuse |
|
|