So how do I make the blur of 10 slowly happen when a player touches a brick while the GUI comes down but when they leave, the shop goes up and the blur effect goes to 0 slowly in the background.
I kept testing but it doesn't seem to work for me.
local blur = Instance.new("BlurEffect",game.Workspace.CurrentCamera) blur.Name = "BlurTwo" blur.Size = 0 local Delay = 1 -- Time it takes to scroll down / up function onTouch(hit) if game.Players:FindFirstChild(hit.Parent.Name) then local player = game.Players:GetPlayerFromCharacter(hit.Parent) if not player.PlayerGui:FindFirstChild("Shop") then local gui = script.Shop:Clone() gui.Parent = player.PlayerGui gui.Frame:TweenPosition(UDim2.new(.25,0,.25,0),"Out","Quint",Delay,true) for i = 0,10,1 do wait() blur.Size = i end repeat wait() until (player.Character.HumanoidRootPart.Position - script.Parent.Position).magnitude > 5 gui.Frame:TweenPosition(UDim2.new(.25,0,-1,0),"Out","Quint",Delay,true) for i = 10,0,-1 do wait() blur.Size = i end wait(Delay) gui:Remove() end end end script.Parent.Touched:Connect(onTouch)
I think I got it. I don't think that using the TweenService on blur is correct, although it may seem to be, you should use the normal way, of fading by changing size. As I tested in my own game something equal, just change it's transpraency. You can also set this variable :
local blurFade = for i = 1, 10, -1 X.X.X.Blur.Size = Result
That's how you can use it, and I just checked it 1 min ago, and it works perfectly. I recommend you to try a few ways before randomly asking questions here. And good luck at programming.