Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I'm making a gif playback script. I get on error on my script and I currrently need help. (?)

FPS = 1 -- How many frames per second it will run at.



GIF = {"rbxassetid://614166207","http://www.roblox.com/asset/?id=614196198,rbxassetid://614212267","rbxassetid://614243948","rbxassetid://614245502","rbxassetid://614624256","rbxassetid://614652355","rbxassetid://614749146","rbxassetid://614750178","http://www.roblox.com/asset/?id=166249907","rbxassetid://614751359","rbxassetid://614755688","rbxassetid://614756818","http://www.roblox.com/asset/?id=166249942","http://www.roblox.com/asset/?id=166249964","rbxassetid://614758943","rbxassetid://614761035","rbxassetid://614764045","http://www.roblox.com/asset/?id=166250031"} 
script.Parent:WaitForChild("ImageLabel")
ImageLabel = script.Parent.ImageLabel


for N,F in ipairs(GIF) do
	game:GetService("ContentProvider"):Preload(F) -- This is supposed to preload each decal.


while true do
	for N,F in ipairs(GIF) do -- Run through the GIF table.
		ImageLabel.Image = F
		wait(0.1/FPS)
	end
end

1 answer

✓ Accepted answer

One of the URLs you have is what it mentioned http://www.roblox.com/asset/?id=614196198,rbxassetid://614212267. See, that's one string, not two -- the comma is a character in the URL.

You should presumably split that string up into two strings.

My I suggest formatting your table on multiple lines? Unless they're very small, it's usually best to put one thing per line:

GIF = {
	"rbxassetid://614166207",
	-- your problem is clear now!
	"http://www.roblox.com/asset/?id=614196198,rbxassetid://614212267",
	"rbxassetid://614243948",
	"rbxassetid://614245502",
	"rbxassetid://614624256",
	"rbxassetid://614652355",
	"rbxassetid://614749146",
	"rbxassetid://614750178",
	"http://www.roblox.com/asset/?id=166249907",
	"rbxassetid://614751359",
	"rbxassetid://614755688",
	"rbxassetid://614756818",
	"http://www.roblox.com/asset/?id=166249942",
	"http://www.roblox.com/asset/?id=166249964",
	"rbxassetid://614758943",
	"rbxassetid://614761035",
	"rbxassetid://614764045",
	"http://www.roblox.com/asset/?id=166250031",
} 

It makes large tables easier to manage, and especially highlights inconsistencies

This discussion is preserved as it was. New answers, comments, and votes are closed.