GUI Static effect not working

Hi all

  1. What do you want to achieve? I am making a horror game in which when a player dies there is a
    static effect which is achieved by changing the image id every 0.1 seconds.

  2. What is the issue?

local image = script.Parent.ImageLabel.Image

while true do
	wait(0.1)
	image = "http://www.roblox.com/asset/?id=10624008183"
	wait(0.1)
	image = "http://www.roblox.com/asset/?id=10624013425"
	wait(0.1)
	image = "http://www.roblox.com/asset/?id=10624017649"
end

It is a very simple script but for some reason i dose not work

i was hoping some one out here can help me.

Thank You

1 Like
  1. Use task.wait() instead of wait().
  2. Try to use this method: rbxassetid://ASSET_ID and see if it works.
1 Like

right here you are setting the variable image to the image of the ImageLabel when the game starts.
you’d want to do

local image = script.Parent.ImageLabel

while true do
	wait(0.1)
	image.Image = "http://www.roblox.com/asset/?id=10624008183"
	wait(0.1)
	image.Image = "http://www.roblox.com/asset/?id=10624013425"
	wait(0.1)
	image.Image = "http://www.roblox.com/asset/?id=10624017649"
end

let me know if this doesn’t work

1 Like

sorry but it dint work
i tried task wait along with you script also

1 Like

try this

local image = script.Parent.ImageLabel

while true do
	task.wait(0.1)
	image.Image = "http://www.roblox.com/asset/?id=10624008171"
	task.wait(0.1)
	image.Image = "http://www.roblox.com/asset/?id=10624013410"
	task.wait(0.1)
	image.Image = "http://www.roblox.com/asset/?id=10624017629"
end

I changed the image IDs game compatible (I don’t really know if this is the right way to explain this) and it worked perfectly for me

1 Like

You probably used a local script right?

1 Like