I added Blur to the player’s screen when the menu is on their screen. When they click the play button, the blur is supposed to be removed. However, it wasn’t removed for some reason and I don’t understand why. I used three scripts and a remote event (to remove the blur) because I don’t know how to get the player’s camera through a local script.
script #1:
local TweenService = game:GetService("TweenService")
local plr = game.Players.LocalPlayer
local TitleGUI = script.Parent.Parent.TitleText
TitleGUI.Position = UDim2.new(0.245,0,0.355,0)
local PlayButton = script.Parent
PlayButton.Position = UDim2.new(0.389,0,0.518,0)
local hasClicked = false
script.Parent.MouseButton1Down:Connect(function()
if hasClicked == false then
hasClicked = true
TitleGUI:TweenPosition(TitleGUI.Position + UDim2.new(0,0,-1,0))
PlayButton:TweenPosition(PlayButton.Position + UDim2.new(0,0,1,0))
game.ReplicatedStorage.RemoteEvents.RemoveBlur:FireServer(plr)
end
end)
script #2:
local RemoteEvent = game.ReplicatedStorage.RemoteEvents.RemoveBlur
RemoteEvent.OnServerEvent:Connect(function()
local camera = workspace.CurrentCamera
camera.blur.Enabled = false
end)
script #3:
local blur = Instance.new("BlurEffect")
blur.Name = "blur"
blur.Parent = game.Lighting
blur.Size = 15
blur.Enabled = false
local camera = workspace.CurrentCamera
game.Players.PlayerAdded:Connect(function(player)
local clonedBlur = blur:Clone()
clonedBlur.Parent = camera
blur.Enabled = true
end)