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 |
|
|
|
| 07 Oct 2016 01:34 PM |
| you can use the developer console to debug your scripts in game (f9) |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| Joined: 01 May 2014 |
| Total Posts: 6921 |
|
|
| 07 Oct 2016 01:35 PM |
I suppose, I'll try I guess.
|
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| Joined: 01 May 2014 |
| Total Posts: 6921 |
|
|
| 07 Oct 2016 01:42 PM |
No. I said PlayerGui not StarterGui.
|
|
|
| Report Abuse |
|
|
|
| 07 Oct 2016 01:43 PM |
Wrong.
Learn how to read errors |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 01 May 2014 |
| Total Posts: 6921 |
|
| |
|