StarterGUI trouble

Once I got into my Roblox game everything showed up like the menu I created but every time I clicked one of the text buttons they wouldn’t do anything. Any feedback on that? Here is the picture of the script and here is my Starter GUI.

2 Likes

Also forgot to add SettingGUI

1 Like

acording to that image of your explorer:

script.Parent.PlayBTN

will be nil
it should instead be

script.Parent.LoadingFrame.PlayBTN
4 Likes

In your variables, you have to add .LoadingFrame

New Variables:

Local Play = script.Parent.LoadingFrame.PlayBTN
Local CreditsBTN = script.Parent.LoadingFrame.CreditsBTN
Local Credits = script.Parent.LoadingFrame.Credits

So do I just copy and paste that where it needs to be?

Do I copy and paste that where it needs to be?

Yeah the replace the top section of your code with:

local Play = script.Parent.LoadingFrame.PlayBTN
local CreditsBTN = script.Parent.CreditsBTN
local Credits = script.Parent.Credits

game.Lighting.Blue.Enabled = true

Yes, and remove the existing variables.

So I did what you guys said and nothing has happened, It’s still doing the same thing with the same result.

Can you provide an image with your script and output?

Also I am confused why you have used while wait(0.1) do

So this is the entire script, and I’m not sure what you mean by the output mind telling me what you mean by that. I’m sure I will get what your saying it’s just not hitting me atm. Script1GUI

Here is what happens after I save and log into my game. I continue clicking the TextButtons and they do absolutely nothing. It just stays like this.

To enable output, you go to the top left corner and click the “View” tab. Then you click the “Output” button.

Use this instead, you didn’t add the loading frame for credits:

Local Play = script.Parent.LoadingFrame.PlayBTN
Local CreditsBTN = script.Parent.LoadingFrame.CreditsBTN
Local Credits = script.Parent.LoadingFrame.Credits

Your play button won’t work because it is throwing an error.

This line:

game.Lighting.Blur.Size = game.Lighting.Blur.Size = 1 would throw an error, because you are trying to set something as the same operator

Instead, you can do

gane.Lighting.Blur.Size = 1

If you are looking for the blur to go away, you can set the .Enabled property on the blur to false, removing the blur.

Other people may have solved this, but here’s what I think would work.


local par = script.Parent
local pbtn = par.LoadingFrame.PlayBTN
local cbtn = par.LoadingFrame.CreditsBTN
local cf = par.LoadingFrame.Credits

game.Lighting.Blur.Enabled = true

local co = false
local wt = 0.1

cbtn.MouseButton1Click:Connect(function()
    if co == false then
        wait(wt)
        cf.Visible = true
    else
        cf.Visible = false
    end
end)

pbtn.MouseButton1Click:Connect(function()
    wait(wt)
    local Lt = game.Lighting
    Lt.Blur.Size = 1
    par.LoadingFrame.Enabled = false
    print("Finished Loading Thanks")
end)

See if that works.

Oh so this is the output.

09:14:50.328 Connecting to server… - Studio
09:15:17.146 Stack Begin - Studio
09:15:17.146 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 32 - function LoadComponent - Studio
09:15:17.147 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 892 - Studio
09:15:17.147 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 79 - Studio
09:15:17.148 Script ‘cloud_144950355.Building Tools.Libraries.Signal’, Line 46 - Studio
09:15:17.148 Stack End - Studio
09:15:17.152 Stack Begin - Studio
09:15:17.153 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 32 - function LoadComponent - Studio
09:15:17.153 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 892 - Studio
09:15:17.154 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 79 - Studio
09:15:17.154 Script ‘cloud_144950355.Building Tools.Libraries.Signal’, Line 46 - Studio
09:15:17.154 Stack End - Studio
09:15:17.157 Stack Begin - Studio
09:15:17.157 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 32 - function LoadComponent - Studio
09:15:17.157 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 892 - Studio
09:15:17.158 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 79 - Studio
09:15:17.158 Script ‘cloud_144950355.Building Tools.Libraries.Signal’, Line 46 - Studio
09:15:17.159 Stack End - Studio
09:15:17.238 Stack Begin - Studio
09:15:17.239 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 32 - function LoadComponent - Studio
09:15:17.239 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 892 - Studio
09:15:17.242 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 79 - Studio
09:15:17.242 Script ‘cloud_144950355.Building Tools.Libraries.Signal’, Line 46 - Studio
09:15:17.242 Stack End - Studio
09:15:17.354 Stack Begin - Studio
09:15:17.354 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 32 - function LoadComponent - Studio
09:15:17.355 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 892 - Studio
09:15:17.356 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 79 - Studio
09:15:17.357 Script ‘cloud_144950355.Building Tools.Libraries.Signal’, Line 46 - Studio
09:15:17.357 Stack End - Studio
09:15:17.394 Stack Begin - Studio
09:15:17.402 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 32 - function LoadComponent - Studio
09:15:17.402 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 892 - Studio
09:15:17.403 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 79 - Studio
09:15:17.404 Script ‘cloud_144950355.Building Tools.Libraries.Signal’, Line 46 - Studio
09:15:17.404 Stack End - Studio
09:15:17.426 Stack Begin - Studio
09:15:17.427 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 32 - function LoadComponent - Studio
09:15:17.428 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 892 - Studio
09:15:17.433 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 79 - Studio
09:15:17.434 Script ‘cloud_144950355.Building Tools.Libraries.Signal’, Line 46 - Studio
09:15:17.434 Stack End - Studio
09:15:17.439 Stack Begin - Studio
09:15:17.440 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 32 - function LoadComponent - Studio
09:15:17.441 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 892 - Studio
09:15:17.441 Script ‘cloud_144950355.Building Tools.Libraries.Cheer’, Line 79 - Studio
09:15:17.442 Script ‘cloud_144950355.Building Tools.Libraries.Signal’, Line 46 - Studio
09:15:17.443 Stack End - Studio
09:15:31.316 Stack Begin - Studio
09:15:31.316 Script ‘cloud_3667046367.Folder.ScreenGui.Script’, Line 67 - Studio
09:15:31.316 Stack End - Studio

Change:

game.Lighting.Blur.Size = game.Lighting.Blur.Size = 1

To just:

game.Lighting.Blur.Size = 1

That actually got the credits to work but the play button still does nothing.