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 » Scripting Helpers
Home Search
 

Re: I need help with this -- GUI Text Change?

Previous Thread :: Next Thread 
guitarplayer12345 is not online. guitarplayer12345
Joined: 06 Feb 2010
Total Posts: 1735
06 Jan 2012 05:23 PM
text = game.StarterGui.Message.Frame.Hint

while true do
text.Text = "Waiting for next round..."
wait(12)
text.Text = "Get ready!"
wait(3)
text.Text = "5..."
wait(1)
text.Text = "4..."
wait(1)
text.Text = "3..."
wait(1)
text.Text = "2..."
wait(1)
text.Text = "1..."
wait(1)
text.Text = "Begin!"
wait(5)
end

It works fine in studio mode. When I play the game, it doesn't do anything.. it doesn't change.
Why?
Report Abuse
Grove537 is not online. Grove537
Joined: 05 Feb 2010
Total Posts: 3478
06 Jan 2012 05:24 PM
Since it's a gui, you need to go into every player's PlayerGui and change it, or they won't see it change until they respawn.
Report Abuse
guitarplayer12345 is not online. guitarplayer12345
Joined: 06 Feb 2010
Total Posts: 1735
06 Jan 2012 05:25 PM
Ohh...
Report Abuse
guitarplayer12345 is not online. guitarplayer12345
Joined: 06 Feb 2010
Total Posts: 1735
06 Jan 2012 05:27 PM
How would I do that?
Report Abuse
guitarplayer12345 is not online. guitarplayer12345
Joined: 06 Feb 2010
Total Posts: 1735
06 Jan 2012 05:28 PM
(Just noticed you're one day older than me. o.e)
Report Abuse
Ravenshield is not online. Ravenshield
Joined: 21 Nov 2007
Total Posts: 4143
06 Jan 2012 05:29 PM
You'll notice that it only changes the text in the Hint placed in game.StarterGui. This means.. Depending on when your character respawns, you get a different text. But as long as your character is alive, you will be stuck with one specific text.


Try this:

while true do
for _, plyrs in pairs(game.Players:GetChildren()) do
if plyrs and plyrs.PlayerGui.Message.Frame:FindFirstChild("Hint") then
local text = plyrs.PlayerGui.Message.Frame.Hint
text.Text = "Waiting for next round..."
wait(12)
text.Text = "Get ready!"
wait(3)
text.Text = "5..."
wait(1)
text.Text = "4..."
wait(1)
text.Text = "3..."
wait(1)
text.Text = "2..."
wait(1)
text.Text = "1..."
wait(1)
text.Text = "Begin!"
wait(5)
end
end


Though.. I see a potential problem with this. Let me test it.
Report Abuse
guitarplayer12345 is not online. guitarplayer12345
Joined: 06 Feb 2010
Total Posts: 1735
06 Jan 2012 05:31 PM
Doesn't work. :L
Report Abuse
guitarplayer12345 is not online. guitarplayer12345
Joined: 06 Feb 2010
Total Posts: 1735
06 Jan 2012 05:34 PM
Needed an end. Testing it again.

Nope.
Report Abuse
Ravenshield is not online. Ravenshield
Joined: 21 Nov 2007
Total Posts: 4143
06 Jan 2012 05:37 PM
But I don't see what you're trying to do with the script (well, obviously you're changing the text of a GUI..). Why don't you just hook-up the text-changing with your round-script?
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
06 Jan 2012 05:42 PM
while true do
for _, plyrs in pairs(game.Players:GetChildren()) do
if plyrs and plyrs.PlayerGui.Message.Frame:FindFirstChild("Hint") then
local text = plyrs.PlayerGui.Message.Frame.Hint
text.Text = "Waiting for next round..."
wait(12)
text.Text = "Get ready!"
wait(3)
text.Text = "5..."
wait(1)
text.Text = "4..."
wait(1)
text.Text = "3..."
wait(1)
text.Text = "2..."
wait(1)
text.Text = "1..."
wait(1)
text.Text = "Begin!"
wait(5)
end
end
end
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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