I have made a script where the ImageLabel changes position randomly with a fading in and out effect
Now it works but not how i wanted it to…
It sometimes changes the position while the fading in and out effect is being played
i want that it fades in at random times, and stays there for a random time, and fades out, then changes its position, and the cycle repeats itself.
Now heres my code, i tried everything but i couldn’t get it to work:
local guiElement = script.Parent local function Move() while true do guiElement.Position = UDim2.new(math.random(), 0, math.random(), 0) for transparency = 0, 1, 0.01 do guiElement.ImageTransparency = transparency wait(0.007) end wait(math.random(1, 6)) for transparency = 1, 0, -0.01 do guiElement.ImageTransparency = transparency wait(0.007) end wait(math.random(1, 6)) end end Move()
I’d be very happy if you guys would help me!