Don't know what's wrong with this main menu local script, no errors / warnings appearing

I’m making a very very simple main menu though, it doesn’t appear to do anything when I click the button that should do the requested things. I’ve tried re-arraging the code and editing it but nothing seems to be working. Please help!

This is what happens when I try playtest the game:

Heres the script:
ps. I’m very… VERY new to scripting so if the code is severely incorrect, you know why


The local script is located in StarterGui with a parent that is a ScreenGui named “InsertedObjects”

1 Like

this is because you are trying to check when a startergui button is clicked. You need to find the button in the playergui, not the startergui.

local plr = game.Players.LocalPlayer
local button = plr.PlayerGui.InsertedObjects.Button ---like this
1 Like

Okay, let me try moving it then

it’s not really about moving anything as you are just trying to find it in the wrong place.

Well, I meant move the button to the right place

if the button is inside of StarterGui, it automatically clones to people’s PlayerGui. You just need to check the playergui to find what is showing on the player’s screen.

Sorry, I don’t understand. Can you explain it in another way if possible?

Ok, when a player joins, everything that is in StarterGui then replicates into their PlayerGui. If you want to edit what they are seeing, you have to go through their PlayerGui.

Oh, I see now. Let me try

ignore this this is just the 30 letter thing

Still isn’t working, did I do something wrong?
local plr = game.Players.LocalPlayer
local button = plr.PlayerGui.InsertedObjects.Button
local Notice = game.PlayerGui.InsertedObjects.Notice
local blur = game.Lighting.Blur
game.Players.LocalPlayer.Character:WaitForChild(“Humanoid”).WalkSpeed = 0
game.Players.LocalPlayer.CameraMaxZoomDistance = 50
game.Players.LocalPlayer.CameraMinZoomDistance = 50
print (“Main Menu Camera Has Started Running”)
local cam = workspace.CurrentCamera
local CameraLock = game.Workspace.CameraLock
wait (0.1)
cam.Focus = CameraLock.CFrame
cam.CameraType = “Fixed”
game.StarterGui.InsertedObjects.MouseButton1Click:Connect(function()
Notice.Visible = false
button.Visible = false
wait (0.2)
blur.Size = 12
wait (0.2)
blur.Size = 9
wait (0.2)
blur.Size = 7
wait (0.2)
blur.Size = 5
game.Players.LocalPlayer.Character:WaitForChild(“Humanoid”).WalkSpeed = 16
game.Players.LocalPlayer.CameraMaxZoomDistance = 200
game.Players.LocalPlayer.CameraMinZoomDistance = 0.5
cam.CameraType = “Custom”
cam.CameraSubject = workspace.player.Character.Humanoid

end)

should be

local Notice = plr.PlayerGui.InsertedObjects.Notice

should be

plr.PlayerGui.InsertedObjects.MouseButton1Click:Connect(function()

that’s all the mess ups I see rn

1 Like

Aight, fixed those. I’m gonna try and find some more errors