I honestly have no idea what is causing this, but its very distracting. I am making a motion blur type effect (similar to source engine games) and although I have been successful I keep getting this weird background distortion and I can’t seem to fix it, anyone know why? I am creating this effect by making a ton of transparent viewportframes in a for loop that grow in size with each one, they are all centered directly on the screen.
The problem in question:
https://gyazo.com/048f05659121650f55dae603877705a1
The script:
local ogSize = 0.1
local amnt = 100
for count = 0, amnt do
print(ogSize)
local Viewport = script.Parent.Frames.ViewportFrame:Clone()
Viewport.Parent = script.Parent.Frames
local RunService = game:GetService("RunService")
Viewport.CurrentCamera = Instance.new("Camera", Viewport)
Viewport.ImageTransparency = 0.7
Viewport.Size = UDim2.new(ogSize, 0, ogSize, 0)
ogSize += 0.01
RunService.RenderStepped:Connect(function()
Viewport.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame
end)
for _, c in pairs(workspace:GetChildren()) do
pcall(function()
c:Clone().Parent = Viewport
end)
end
end