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: text in my GUI isnt changing?

Previous Thread :: Next Thread 
mikkjal134 is not online. mikkjal134
Joined: 13 Aug 2009
Total Posts: 1289
26 Sep 2015 01:57 AM
The original text is "Waiting 4 game" the script is

m = game.StarterGui.ScreenGui.Frame.TextBox

while wait() do

m.Text = "Game is loading..."
wait(5)

wait()

m.Text = "insert text here"

For some reason it only changes to "Game is loading" but doesnt change to "insert text here"
what is the reasonf or this?
Report Abuse
McGunz is not online. McGunz
Joined: 26 Dec 2011
Total Posts: 759
26 Sep 2015 02:13 AM
while wait() do

Is a loop, it loops 0 seconds to Game is loading. remove the loop!


a noob will be a noob and will always be a noob
Report Abuse
Aexura is not online. Aexura
Joined: 06 Aug 2015
Total Posts: 265
26 Sep 2015 02:18 AM
McGunz, you sir, are a noob yourself. Go to the wiki and read scripting for dummies.

Cant you see where it says "StarterGui"?
Report Abuse
mikkjal134 is not online. mikkjal134
Joined: 13 Aug 2009
Total Posts: 1289
26 Sep 2015 02:19 AM
m.Text = "Game is loading..."
wait(5)

m.Text = "insert text here"

right now it looks like this. IT still doesnt change the text in the gui from "Game is loading"
Report Abuse
Aexura is not online. Aexura
Joined: 06 Aug 2015
Total Posts: 265
26 Sep 2015 02:20 AM
McGunz, you sir, are a noob. (2)

while wait() do

wait() ~= 0 seconds, it equals to < 0.03 seconds and > 0 seconds.

Have you ever heard of tick()?
Report Abuse
Aexura is not online. Aexura
Joined: 06 Aug 2015
Total Posts: 265
26 Sep 2015 02:21 AM
"StarterGui" basically clones to the player's actual gui. So you have to do some studying before changing all the player's gui one by one.
Report Abuse
McGunz is not online. McGunz
Joined: 26 Dec 2011
Total Posts: 759
26 Sep 2015 02:26 AM
chill bruh no need to spread hate lol


a noob will be a noob and will always be a noob
Report Abuse
mikkjal134 is not online. mikkjal134
Joined: 13 Aug 2009
Total Posts: 1289
26 Sep 2015 02:26 AM
never heard of tick(). Whats it for?
Report Abuse
McGunz is not online. McGunz
Joined: 26 Dec 2011
Total Posts: 759
26 Sep 2015 02:26 AM
btw its my siggy

a noob will be a noob and will always be a noob
Report Abuse
Aexura is not online. Aexura
Joined: 06 Aug 2015
Total Posts: 265
26 Sep 2015 02:27 AM
Lmao I didn't know it was your siggy xD

My bad.
Report Abuse
Aexura is not online. Aexura
Joined: 06 Aug 2015
Total Posts: 265
26 Sep 2015 02:28 AM
tick() is basically like a timer, ranging from seconds to milliseconds.
Report Abuse
McGunz is not online. McGunz
Joined: 26 Dec 2011
Total Posts: 759
26 Sep 2015 02:34 AM
lol yeah whenever I post I always think are people gonna know its my siggy? haha no problems trust me i've been in the same situation before.


a noob will be a noob and will always be a noob [ just a siggy ]
Report Abuse
mikkjal134 is not online. mikkjal134
Joined: 13 Aug 2009
Total Posts: 1289
26 Sep 2015 02:35 AM
just how much is a second on tick()
I tried 50000 and it still changed in less than I can count
Report Abuse
Aexura is not online. Aexura
Joined: 06 Aug 2015
Total Posts: 265
26 Sep 2015 02:38 AM
No you don't use it like that, silly.

local StartTimer = tick()
wait()
local EndTimer = tick()
print(EndTimer - StartTimer) -- Prints how long did "wait()" last.
Report Abuse
mikkjal134 is not online. mikkjal134
Joined: 13 Aug 2009
Total Posts: 1289
26 Sep 2015 02:46 AM
still dont understand why the text isnt changing though
Report Abuse
DoNotReadThisNamePlz is not online. DoNotReadThisNamePlz
Joined: 01 Aug 2014
Total Posts: 679
26 Sep 2015 03:02 AM
I have this problem a lot.
Simply place the script inside the TextBox and change it from:
m = game.StarterGui.ScreenGui.Frame.TextBox
To:
m = script.Parent

And if you need it to be called by something, try using a global function around it.
_G.mText = function()
{Insert script here}
End

And call it with inside another script.

_G.mText()

Enjoy :P
Report Abuse
mikkjal134 is not online. mikkjal134
Joined: 13 Aug 2009
Total Posts: 1289
26 Sep 2015 03:19 AM
placing it in the textbox probably wont work since the entire game is in that single script... The script also spawns zombies and changes the music. It makes the storyline. Putting it somewhere else makes the zombies not function properly.
Report Abuse
DoNotReadThisNamePlz is not online. DoNotReadThisNamePlz
Joined: 01 Aug 2014
Total Posts: 679
26 Sep 2015 03:25 AM
If it is in a whole big script, then use the global function like I said. I'm so lazy, on one of my games, I just have a long line of global functions. They work amazingly.
Report Abuse
mikkjal134 is not online. mikkjal134
Joined: 13 Aug 2009
Total Posts: 1289
26 Sep 2015 03:28 AM
dont know how. Only a beginner in scripting DX
Report Abuse
mikkjal134 is not online. mikkjal134
Joined: 13 Aug 2009
Total Posts: 1289
26 Sep 2015 03:44 AM
after using my phone and alt to rejoin the same server it showed me that the text was there but didnt update to the player. I dont know how to explain it though. The next text was there when I rejoined the same server like as if it doesnt update to the player and only on the server.
Report Abuse
DoNotReadThisNamePlz is not online. DoNotReadThisNamePlz
Joined: 01 Aug 2014
Total Posts: 679
26 Sep 2015 03:50 AM
Yep. That's what happens.

Anyway...

In your main script, where the gui script should be, put:
_G.mText()

And, in the new script, inside the TextBox, put:
_G.mText = function()
{The script here, which has m = script.Parent}
end
Report Abuse
mikkjal134 is not online. mikkjal134
Joined: 13 Aug 2009
Total Posts: 1289
26 Sep 2015 03:56 AM
dont fully understand since the game script is inside of workspace. If its not there the zombies will fail and the game basically breaks.
Am I supposed to put
_G.mText()
inside the script in workspace?
Currently I have no script in the textbox. The change is supposed to be made in the primary script which has the game, at least how I understand anything.
Report Abuse
DoNotReadThisNamePlz is not online. DoNotReadThisNamePlz
Joined: 01 Aug 2014
Total Posts: 679
26 Sep 2015 04:00 AM
Yes, put _G.mText() in the script in the Workspace, and copy and remove the gui part of the script.
Then make a new script inside the TextBox. Write:
_G.mText = function()

end

And put the script in between the function and the end.
Report Abuse
mikkjal134 is not online. mikkjal134
Joined: 13 Aug 2009
Total Posts: 1289
26 Sep 2015 04:02 AM
where in the script should I put _G.mText()? The top or somewhere?
Report Abuse
DoNotReadThisNamePlz is not online. DoNotReadThisNamePlz
Joined: 01 Aug 2014
Total Posts: 679
26 Sep 2015 04:04 AM
Put _G.mText() where the gui part of the script used to be.
So like:
{Script}
_G.mText()
{Script}
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