Could someone make this script that makes a GUI go to a position with animation and that increases the blur, someone put an animation of the blur appearing please in the part of increasing the blur
script.Parent.MouseButton1Click:Connect(function()
local blur = game.Lighting.Blur
blur.Size = 2
local shop = script.Parent.Parent
shop:TweenPosition(UDim2.new(0.297, 0,-0.859, 0),“Out”,“Quart”,3,true)
end)
local tweenService = game:GetService("TweenService")
local blur = game.Lighting.Blur
local button = script.Parent
local tweenInfo = TweenInfo.new(3)--change this number the time you want the tween to take
local tween = tweenService:Create(blur, tweenInfo, {Size = 24})
button.MouseButton1Click:Connect(function()
tween:Play()
end)
You can use TweenService to smooth properties of most objects intuitively. In this use case, I’d store a Tween object at the start…
local Tween = TweenService:Create(
blur, -- the object to tween
TweenInfo.new(0.5) -- info on how the tween should behave. first argument is tween duration, so it's set to half a second here
{Size = 24} -- properties to tween to
)
then play it inside the MouseButton1Clicked event.
script.Parent.MouseButton1Click:Connect(function()
local blur = game.Lighting.Blur
Tween:Play()
-- rest of the script