How would I stop this delay with the button

So I made a camera menu system that the parts moves and you can see it on the Ui but the error really is that when you click the play button it has a little delay removing the camera view of the menu watch this video below:

See it has a massive delay if anyone could help please do and here’s the script

(If I need to explain more please tell me I will add pictures to where the stuff is and ignore the inventory ui)

script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Parent.LocalScript:Destroy()
    cam.CameraType = Enum.CameraType.Custom
    script.Parent.Parent.Enabled = false
end)

Perhaps it is taking a while getting rid of the camera? Check your workspace and see all long it takes to change each item.

I can’t find the issue and what do you mean by how long it takes to change each item.

Could you drop a rbxl of the game? Are the parts tweened? Is the tween too short? An rbxl would help.

Here’s a game file of the camera stuff:

Baseplate.rbxl (32.6 KB)

This is probably a loading issue, but what I would do to fix this is to have a loading screen! Therefore, people don’t have to get bored waiting – add tips and stuff.

If you could help me do that @earthyviking92 because I am not a really good script but I have found a way to fix the button delay its just that I don’t have the camera moving anymore because I did it a different way(I made a new menu)

Sorry didn’t see that immediately. You would create a frame that fills the whole screen, and then wait for how long it is usually loading (use a stopwatch for this). Then once the timer is up, delete the loading screen. Just DM me if you need anymore help!