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: Works in studio, doesn't work in game.

Previous Thread :: Next Thread 
leo1457 is online. leo1457
Joined: 01 May 2014
Total Posts: 6921
07 Oct 2016 01:32 PM
I have a localscript inside a textbutton and when you click it, it will teleport you to the spawn and change your teamcolor and will make the gui not visible to the player and will make another gui come up. Changing teamcolor and teleporting works, but it will not make the gui go away and load up the other one. By the way, it's not filtering enabled. Here's the script:

LocalScript that works in studio:

player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
player.TeamColor = BrickColor.new("Bright red")
player.Character:MoveTo(workspace.JapanSpawn.Position)
player.PlayerGui.TeamChange.Frame.Visible = false
player.PlayerGui.WelcomeScreen.Frame.Visible = true
end)

What do I do?


Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
07 Oct 2016 01:34 PM
you can use the developer console to debug your scripts in game (f9)
Report Abuse
Wunder_Wulfe is not online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
07 Oct 2016 01:35 PM
### it all in one big gui and use the ######## of script instead of making millions of screen guis for each thing
Report Abuse
leo1457 is online. leo1457
Joined: 01 May 2014
Total Posts: 6921
07 Oct 2016 01:35 PM
I suppose, I'll try I guess.


Report Abuse
leo1457 is online. leo1457
Joined: 01 May 2014
Total Posts: 6921
07 Oct 2016 01:39 PM
This is the output in the developer console:

StarterGui is not a valid member of Player
Stack begin
Script 'script.leo1457.PlayerGui.TeamChange.Frame.TextButton.LocalScript', Line 6
Stack End


Report Abuse
Wunder_Wulfe is not online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
07 Oct 2016 01:40 PM
Can you read??
Startergui does not exist in the player
That should be obvious

Somewhere you are doing player.Startergui
Report Abuse
leo1457 is online. leo1457
Joined: 01 May 2014
Total Posts: 6921
07 Oct 2016 01:42 PM
No. I said PlayerGui not StarterGui.


Report Abuse
Wunder_Wulfe is not online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
07 Oct 2016 01:43 PM
Wrong.

Learn how to read errors
Report Abuse
leo1457 is online. leo1457
Joined: 01 May 2014
Total Posts: 6921
07 Oct 2016 01:45 PM
I've checked my whole script. I can't find 'player.StarterGui'


Report Abuse
Wunder_Wulfe is not online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
07 Oct 2016 01:50 PM
"This is the output in the developer console:

StarterGui is not a valid member of Player
Stack begin
Script 'script.leo1457.PlayerGui.TeamChange.Frame.TextButton.LocalScript', Line 6
Stack End"
Go to that script (.......TeamChange.Frame.TextButton.LocalScript) and go to line 6

Duh
Report Abuse
leo1457 is online. leo1457
Joined: 01 May 2014
Total Posts: 6921
07 Oct 2016 01:52 PM
Ik but there's nothing wrong there for me, so I'm asking for help.


Report Abuse
Wunder_Wulfe is not online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
07 Oct 2016 01:54 PM
If the output says there was an error there, then there was an error there and if you could read correctly you could find out why .-.
Report Abuse
leo1457 is online. leo1457
Joined: 01 May 2014
Total Posts: 6921
07 Oct 2016 01:55 PM
:/ this whole thread was about help. I don't know what to correct because in my eyes, it looks correct and some guy told me to put it. So can you help me?


Report Abuse
Wunder_Wulfe is not online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
07 Oct 2016 01:56 PM
Obviously whatever you are getting the StarterGui of in line 6 is a player which is incorrect

Learn about Starter and Player guis
Report Abuse
leo1457 is online. leo1457
Joined: 01 May 2014
Total Posts: 6921
07 Oct 2016 01:58 PM
Can anybody help?


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