I made a menu gui with a blur effect that goes away after pressing a button. It works fine until the play resets, then the blur doesn’t go away.
This is the localscript in the button:
local Camera = workspace.CurrentCamera;
Camera.CameraType = Enum.CameraType.Scriptable;
Camera.CFrame = workspace.CameraPos.CFrame;
local Player = game.Players.LocalPlayer;
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Enabled = false;
wait(1);
workspace.CurrentCamera.Blur.Enabled = false
Camera.CameraSubject = Player.Character.Humanoid;
Camera.CameraType = Enum.CameraType.Custom;
Camera.CFrame = Player.Character.Head.CFrame;
end)```
Is it possible that the ScreenGui the button is in is set to “ResetOnSpawn = false”, because if so then the button won’t work anymore as the local script sets it to Enabled = false, and though the blur in the camera may reappear the button won’t be able to disable the blur?
The other code is under another localscript under startergui called MainCamera. Also, the camera is based off the position of a brick called CameraPos in workspace
local camera = workspace.CurrentCamera
repeat wait()
camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable
camera.CFrame = workspace.CameraPos.CFrame
local blur = Instance.new("BlurEffect")
blur.Parent = camera```