Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Store GUI showing new frames in Roblox Studio, but not in Roblox Player?

Asked by
thezube 10
8 years ago

I have asked this question before but I did not get a good answer. I'm trying to create a store GUI for a game I am making. When I am clicking a ImageButton (This is all scripted) It changes to a new page in studio and works fine. But when I am in the real game, it's not working. I checked the developer console but I didn't find useful information. This has been the problem in the past also and I have not fixed it. Here is a link to the GUI. https://www.roblox.com/library/523645731/ScriptingHelpers-Store-GUI

1 answer

Log in to vote
0
Answered by 8 years ago
Edited 8 years ago

i got this script from the other question. if it's the same. i changed the player

i did this here so if something is missing (like an end), you can add it

also if you was using a local script, you wont need a local script for this script below

changed the code



local Players = game:GetService("Players") function onPlayerAdded(player) print(player.Name .. " has entered the game") local gui = player.PlayerGui local Store = gui.Store -- Don't use parent just put the gui in StarterGUI local StoreBut = Store.StoreBut local MainBack = Store.MainBack local Trails = Store.Trails local Hats = Store.Hats local Guns = Store.Guns MainBack.HatsButton.MouseButton1Click:connect(function() -- Use MouseButton1Click MainBack.Visible = false Hats.Visible = true end) MainBack.SnipersButton.MouseButton1Click:connect(function() -- Use MouseButton1Click MainBack.Visible = false Guns.Visible = true end) MainBack.EffectsButton.MouseButton1Click:connect(function() -- Use MouseButton1Click MainBack.Visible = false Trails.Visible = true end) Hats.Exit.MouseButton1Click:connect(function() Hats.Visible = false MainBack.Visible = true end) Guns.Exit.MouseButton1Click:connect(function() Guns.Visible = false MainBack.Visible = true end) Trails.Exit.MouseButton1Click:connect(function() Trails.Visible = false MainBack.Visible = true end) Hats.Exit.MouseButton1Click:connect(function() Hats.Visible = false MainBack.Visible = true end) Guns.Exit.MouseButton1Click:connect(function() Guns.Visible = false MainBack.Visible = true end) MainBack.Exit.MouseButton1Click:connect(function() MainBack.Visible = false StoreBut.Visible = true end) StoreBut.TextButton.MouseButton1Click:connect(function() MainBack.Visible = true StoreBut.Visible = false end) end --When a player joins, call the onPlayerAdded function Players.PlayerAdded:connect(onPlayerAdded) --Call onPlayerAdded for each player already in the game for _,player in pairs(Players:GetPlayers()) do onPlayerAdded(player) end
0
It say's that PlayerGui is not a valid member of Player, so I added a LocalPlayer in the local gui. It only worked in studio and not in the game once again. thezube 10 — 8y
0
oh the end. xD my bad RobloxianDestory 262 — 8y
0
Nvm! It works! Thank you so so so much! I will forever be grateful :) thezube 10 — 8y
0
the first error i got is the "19:38:58.044 - Store is not a valid member of PlayerGui" so it should work now RobloxianDestory 262 — 8y
Ad

Answer this question