generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • 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
 

Re: Why is this not working?

Previous Thread :: Next Thread 
DewTie is not online. 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
EternallyFaithful is not online. EternallyFaithful
Joined: 23 Jan 2015
Total Posts: 9
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 is not online. 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
EternallyFaithful is not online. EternallyFaithful
Joined: 23 Jan 2015
Total Posts: 9
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
EternallyFaithful is not online. EternallyFaithful
Joined: 23 Jan 2015
Total Posts: 9
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 is not online. DewTie
Joined: 08 Nov 2014
Total Posts: 683
30 Apr 2016 10:00 AM
nothing is overlapping the text label
Report Abuse
EternallyFaithful is not online. EternallyFaithful
Joined: 23 Jan 2015
Total Posts: 9
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 is not online. 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 is not online. 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
EternallyFaithful is not online. EternallyFaithful
Joined: 23 Jan 2015
Total Posts: 9
30 Apr 2016 12:57 PM
try putting the label in a frame


Report Abuse
ExtremeBuilder15 is not online. ExtremeBuilder15
Joined: 01 May 2012
Total Posts: 3176
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
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.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image