My Start GUI isnt working (output says Frame is not a valid member of ScreenGui, it is!) Script:
--Script by club101coolguy local Player = game.Players.LocalPlayer gui = script.Parent.Parent Frame1 = gui.Frame1 Box = gui.Frame1 Play = gui.Play Text = gui.TextLabel local Sound = Instance.new("Sound", gui) Sound.SoundId = "http://www.roblox.com/asset/?id=221235033" Sound.Pitch = 1 Sound.Volume = 0.7 --Variables and Variable Properties Sound:Play() function MouseEnterPlayButton() Play.FontSize = "Size48" end function MouseLeftPlayButton() Play.FontSize = "Size36" end Play.MouseEnter:connect(MouseEnterPlayButton) Play.MouseLeave:connect(MouseLeftPlayButton) --Makes chat Play Button bigger when a mouse hovers. function PlayGame() Box:Destroy() Play:Destroy() Sound:Stop() Text:Destroy() end Play.MouseButton1Down:connect(PlayGame) --When a Player clicks on Play, Music stops and GUIs dissapear.
I believe your problem is just that the script isn't giving the Frame enough time to load into the game.
To fix this, we can simply use the :WaitForChild function. This waits until the given argument is loaded into the game for the script to continue. So, let's try it in your script:
--Script by club101coolguy local Player = game.Players.LocalPlayer gui = script.Parent.Parent Frame1 = gui:WaitForChild("Frame1") Box = gui:WaitForChild("Frame1") Play = gui:WaitForChild("Play") Text = gui:WaitForChild("TextLabel") local Sound = Instance.new("Sound", gui) Sound.SoundId = "http://www.roblox.com/asset/?id=221235033" Sound.Pitch = 1 Sound.Volume = 0.7 --Variables and Variable Properties Sound:Play() function MouseEnterPlayButton() Play.FontSize = "Size48" end function MouseLeftPlayButton() Play.FontSize = "Size36" end Play.MouseEnter:connect(MouseEnterPlayButton) Play.MouseLeave:connect(MouseLeftPlayButton) --Makes chat Play Button bigger when a mouse hovers. function PlayGame() Box:Destroy() Play:Destroy() Sound:Stop() Text:Destroy() end Play.MouseButton1Down:connect(PlayGame) --When a Player clicks on Play, Music stops and GUIs dissapear.
So, now I believe it should work correctly. As you can see, I used it on lines 4-7, just to make sure you have no further loading issues.
Anyways, if you have any further problems/questions, please leave a comment below. Hope I helped, and if I did, an up-vote would be appreciated :P