|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 26 Sep 2015 05:22 PM |
:WaitForChild()
➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2015 05:28 PM |
| @litalela Where do I put that? |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2015 05:49 PM |
Screengui.OpenAndClose:WaitForChild()
Put that at the beginning of the script. |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2015 05:58 PM |
| Do I put it in the localscript for the OpenAndClose button? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|
|
| 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
|
  |
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 27 Sep 2015 05:25 AM |
| ^yes, also has to be in a localscript |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 29 Sep 2015 10:42 AM |
| :WaitForChild("PlayerGui") |
|
|
| Report Abuse |
|
|
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 |
|
|