So I am creating pixelated sprites (the bit characters like old 1985 super mario, not the soda) inside roblox. I tried to create an idle animation using the while true do to loop 2 decals. Here’s the script (which didn’t work):
while true do
script.Parent.Image = "rbxassetid://7437583918"
wait(0.1)
script.Parent.Image = "rbxassetid://7437539524"
wait(0.1)
end
Ask me questions if you don’t seem to understand mine or you need clarifications about the problem.
Edit: For those asking, this is how the script is placed (might help):
There’s not enough context here. If a script isn’t working, consider applying basic debugging strategies first so you can provide a better explanation of the problem. The console is great to narrow down problems whether it’s because your script is throwing an error or because it’s actually not running.
The code doesn’t look incorrect so I assume it’s a problem with the setup but without knowing anything in that regard and only being told “this doesn’t work” it’s hard to offer you any kind of solution. You could share your hierarchy, the script type or any other details that might help. Be descriptive.
while true do
l = script.Parent ---- change this to the parent you want image be in
a = Instance.new("ImageLabel")
a.Size = UDim2.new(0,100,0,100)
a.Position = UDim2.new(0.404,0,0.364,0)
a.Image = "rbxassetid://7437583918"
a.Parent = l
wait(1)
a:Destroy()
v = Instance.new("ImageLabel")
a.Size = UDim2.new(0,100,0,100)
a.Position = UDim2.new(0.404,0,0.364,0)
v.Image = "rbxassetid://7437539524"
v.Parent = l
wait(1)
v:Destroy()
end
dont forget to change the size and position
try this it may work
That’s not enough context so I still can’t help you. Vague answers may only net complicated or unnecessary answers like the above which suggests instancing new ImageLabels instead and that changing the image doesn’t work, which is both incorrect and bad to do.