so im trying to make it so when you click the play button, the textbutton which is the shop button appears, i made it in localscript so it does .Visible = true it didnt work and i tried clicking on it while in game and set it to visible and it didnt appear too but when i click stop and im in like the game viewer it appears but not in the roblox studio game thing
✓ ANSWER ACCEPTED
textbutton isnt appearing in roblox studio game thing but is when i press stop?
1 answer
✓ Accepted answer
Ahh, I see. From your video, I can see that you're getting the Shop button by StarterGui. Always remember that you can't get a button from the StarterGui when the game starts. It's because when the game starts StarterGui will be moved to the client player and be renamed to "PlayerGui". Instead, you can get the "MenuGui" by playBtn.Parent.Parent:WaitForChild("Shop").
Why use WaitForChild? You must always use WaitForChild in a client script because most of the time the client loads faster than the server, and the server provides all Instances of the game, including GUIs. WaitForChild waits until a specific child has been found, and will return that child.
local camera = workspace.CurrentCamera
local playBtn = script.Parent
local gamelogo = script.Parent.Parent:WaitForChild("GameLogo")
local shop = playBtn.Parent.Parent:WaitForChild("Shop")
repeat
task.wait(.1)
camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable
camera.CFrame = workspace:WaitForChild("MenuCamera").CFrame
local function onPlay()
camera.CameraType = Enum.CameraType.Custom
playBtn.Visible = false
workspace:WaitForChild("MenuCamera"):Destroy()
gamelogo:WaitForChild("A"):Destroy()
gamelogo:WaitForChild("F"):Destroy()
gamelogo:WaitForChild("K"):Destroy()
shop.Visible = true
end
playBtn.Activated:Connect(onPlay)
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
i can record it and upload it to youtube if u guys dont understand
please provide a video recording. this lacks information.
https://youtu.be/LpxXqRgrJVY
thank you