How Do i tween Blur?

HI, im darkmenacing, i was coding a script for my game and i wanted to smoothly blur the background while a frame is visible. I tried to tween the blur but i find out that if i try to tween blur, it will show to whole server.
And also, here the script:

local TweenService = game:GetService("TweenService")
local Info = TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.In)
local MainFrame = script.Parent.Parent.Parent
local TweenBlur = TweenService:Create(game:GetService("Lighting").Blur, Info, {Size = 24})
local Tween1 = TweenService:Create(MainFrame.ChangeLog, Info, {Position = UDim2.new(0.4, 0,0.272, 0)})
local AudioPlayer = require(game:GetService("ReplicatedStorage").Modules:WaitForChild("AudioPlayer"))

function AutoCheck()
	if MainFrame.Credits.Visible == true then
		local Tween2 = TweenService:Create(MainFrame.Credits, Info, {Position = UDim2.new(0.569, 0,1.205, 0)})
		Tween2:Play()
		Tween2.Completed:Connect(function()
			MainFrame.Credits.Visible = false
		end)
	elseif MainFrame.Settings.Visible == true then
		local Tween3 = TweenService:Create(MainFrame.Settings, Info, {Position = UDim2.new(0.337, 0,0.947, 0)})
		Tween3:Play()
		Tween3.Completed:Connect(function()
			MainFrame.Settings.Visible = false
		end)
	elseif MainFrame.GamepassShop.Visible == true then
		local Tween4 = TweenService:Create(MainFrame.GamepassShop, Info, {Position = UDim2.new(0.337, 0,0.947, 0)})
		Tween4:Play()
		Tween4.Completed:Connect(function()
			MainFrame.GamepassShop.Visible = false
		end)
	end
end

AudioPlayer.setupAudio({
	["ClickingSound"] = 9475572272
})

script.Parent.MouseButton1Click:Connect(function()
	AudioPlayer.playAudio("ClickingSound")
	MainFrame.ChangeLog.Visible = true
	Tween1:Play()
	AutoCheck()
end)

What should i do?

Is this in a local script? A local script would make the changes for the client instead of the server.

1 Like

Try putting the code in a local script

Yes, its an local script
i didnt know that local script only show to the player

If it’s in a local script, then the blur should be client side unless you’re using remote events to make the server tween the blur.