I am making a gif system with MANY gifs like 10 or 20 and gif system requires loops which causes lag so I made a system that overcomes it using 1 loop but it only works for the first gif and not for the others. I used this guys gif system and edited it to cause less lag as I said and doesn’t work. Here is the script
local warperFramerate = 12
local t = tick()
local function Update()
for i,v in pairs(script.Parent:GetDescendants()) do
if v:FindFirstChild("Columns") then
local columns,rows,frames = v.Columns.Value,v.Rows.Value,v.Frames.Value
-- print(columns,rows,frames)
local lastFrame = v.LastFrame
v.Size = UDim2.new(columns,0,rows,0)
if tick()-t >= 1/warperFramerate then
print(v.Name)
if lastFrame.Value > frames then lastFrame.Value = 1 end
local CurrentColumn = lastFrame.Value
local CurrentRow = 1
repeat
if CurrentColumn > columns then
CurrentColumn = CurrentColumn - columns
CurrentRow = CurrentRow + 1
end
until not(CurrentColumn > columns)
local pos = UDim2.new(-(CurrentColumn-1),0,-(CurrentRow-1),0)
v.Position = pos
t = tick()
lastFrame.Value += 1
end
end
end
end
while true do
Update()
task.wait()
end
after v:FindFirstChild("Columns")
run it for 5 seconds and take a snap shot of the output. i think i figured it out. And hurry cause i’m about to g o to sleep