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 » Game Design
Home Search
 

Re: Scripts not working on servers

Previous Thread :: Next Thread 
CrustyDemons565 is not online. CrustyDemons565
Joined: 25 Nov 2013
Total Posts: 71
26 Sep 2015 01:45 AM
Hi everyone

So recently I started a thread concerning shop GUIs that I had been making. Anyway so today I fixed the problematic local script and was fully convinced I had everything working (as it all worked without trouble in studio's test mode) until I published the changes to ROBLOX and went onto a server only to find the open/close shop button unresponsive! I need help urgently and any help is greatly appreciated (Tell me if I need to post the scripts)
Report Abuse
Lordlukervol is not online. Lordlukervol
Joined: 29 May 2012
Total Posts: 749
26 Sep 2015 06:06 AM
Press F9 and see what it's saying. Tbh I imagine it just doesnt find something because of a lack of :WaitForChild()
Report Abuse
CrustyDemons565 is not online. CrustyDemons565
Joined: 25 Nov 2013
Total Posts: 71
26 Sep 2015 04:43 PM
It says 'OpenAndClose is not a valid member of screen GUI'. What do I have to do to fix this?
Report Abuse
championbuilder is not online. championbuilder
Joined: 20 Jan 2009
Total Posts: 13544
26 Sep 2015 04:46 PM
Well you could do lots of things to fix it. The best suggestion we can give you is "Put OpenAndClose in ScreenGui" based on that.
Report Abuse
CrustyDemons565 is not online. CrustyDemons565
Joined: 25 Nov 2013
Total Posts: 71
26 Sep 2015 04:54 PM
But the OpenAndClose button is already in ScreenGui (excuse any ignorance - Im new to this sort of stuff)
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
26 Sep 2015 05:22 PM
:WaitForChild()

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
CrustyDemons565 is not online. CrustyDemons565
Joined: 25 Nov 2013
Total Posts: 71
26 Sep 2015 05:28 PM
@litalela Where do I put that?
Report Abuse
FrozenxIce is not online. FrozenxIce
Joined: 01 Sep 2011
Total Posts: 26
26 Sep 2015 05:49 PM
Screengui.OpenAndClose:WaitForChild()

Put that at the beginning of the script.
Report Abuse
CrustyDemons565 is not online. CrustyDemons565
Joined: 25 Nov 2013
Total Posts: 71
26 Sep 2015 05:58 PM
Do I put it in the localscript for the OpenAndClose button?
Report Abuse
FrozenxIce is not online. FrozenxIce
Joined: 01 Sep 2011
Total Posts: 26
26 Sep 2015 06:04 PM
Whatever isn't loading properly just put :WaitForChild() at the beginning of the script.

So for example, if you found out a gui couldn't be found, then at the beginning of that script that has the error you'd put:

game.StarterGui.ScreenGui.Button:WaitForChild()

That means it won't run the rest of the script until that button has loaded.
Report Abuse
CrustyDemons565 is not online. CrustyDemons565
Joined: 25 Nov 2013
Total Posts: 71
26 Sep 2015 06:16 PM
Ah I see. Ill try that
Report Abuse
CrustyDemons565 is not online. CrustyDemons565
Joined: 25 Nov 2013
Total Posts: 71
26 Sep 2015 06:26 PM
@Frozen

I tried putting the line you said in at the top of the localscript for the OpenAndClose button and gave it a test in studio, but it didn't work. Did I put it in the wrong localscript?
Report Abuse
Ortron is not online. Ortron
Joined: 19 Jul 2013
Total Posts: 1297
26 Sep 2015 06:28 PM
You'd need to name what you're waiting for in the brackets so if I was waiting for a part NAMED Brick I would do

game.Workspace:WaitForChild("Brick")
Report Abuse
CrustyDemons565 is not online. CrustyDemons565
Joined: 25 Nov 2013
Total Posts: 71
26 Sep 2015 08:58 PM
Oh ok. I will try that
Report Abuse
CrustyDemons565 is not online. CrustyDemons565
Joined: 25 Nov 2013
Total Posts: 71
27 Sep 2015 12:25 AM
I tried putting game.Workspace:WaitForChild('Box') (box is the name of my shop frame) but it is still unresponsive in both studio and in game now. Did I put the right thing in-between the brackets?
Report Abuse
alphaboy299 is not online. alphaboy299
Joined: 15 Jun 2013
Total Posts: 1496
27 Sep 2015 01:22 AM
^Why is the frame in workspace?Shouldn't it be in starter gui?
Gui can only be seen by the player if it is inside playergui.You can pout it there by script or startergui.
Report Abuse
CrustyDemons565 is not online. CrustyDemons565
Joined: 25 Nov 2013
Total Posts: 71
27 Sep 2015 03:26 AM
Ah, silly me! I forgot to change the 'workspace' part to 'starterGUI'! I give changing that a go
Report Abuse
CrustyDemons565 is not online. CrustyDemons565
Joined: 25 Nov 2013
Total Posts: 71
27 Sep 2015 03:39 AM
I changed the game.Workspace:WaitForChild("Box") to game.StarterGui:WaitForChild("Shop GUI") and it worked perfectly in Studio's test mode but not at all when I published to ROBLOX and started playing on a server :(. So I am presented with the same issue. Help!
Report Abuse
alphaboy299 is not online. alphaboy299
Joined: 15 Jun 2013
Total Posts: 1496
27 Sep 2015 04:30 AM
If you want it to work in game then you can't script it to change in starter GUI. You'll have to change it in player GUI.
Game. Players. LocalPlayer. Playergui:WaitForChild("box")
Report Abuse
Ortron is not online. Ortron
Joined: 19 Jul 2013
Total Posts: 1297
27 Sep 2015 04:39 AM
^ should be

Game.Players.LocalPlayer.PlayerGui:WaitForChild("box")

Missed the capitalized G
Report Abuse
alphaboy299 is not online. alphaboy299
Joined: 15 Jun 2013
Total Posts: 1496
27 Sep 2015 05:25 AM
^yes, also has to be in a localscript
Report Abuse
CrustyDemons565 is not online. CrustyDemons565
Joined: 25 Nov 2013
Total Posts: 71
27 Sep 2015 05:14 PM
I added Game.Players.LocalPlayer.Playergui:WaitForChild("Box") to the top of the localscript and it didn't work. I then changed the 'Box' to Shop GUI but that didn't work. So I then noticed a blue underline underneath 'Game' so I tried changing the capital to a lower case but this still didn't work. Why is this not working?
Report Abuse
CrustyDemons565 is not online. CrustyDemons565
Joined: 25 Nov 2013
Total Posts: 71
27 Sep 2015 07:23 PM
I just added a capitalized G to the PlayerGui part. It worked well on studio but did not do anything on the game! Help!!!!!!
Report Abuse
Lordlukervol is not online. Lordlukervol
Joined: 29 May 2012
Total Posts: 749
29 Sep 2015 10:42 AM
:WaitForChild("PlayerGui")
Report Abuse
Ortron is not online. Ortron
Joined: 19 Jul 2013
Total Posts: 1297
29 Sep 2015 12:23 PM
if it's still broke pm me the model and script and i'll fix it for you
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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