Im having a issue to make a gui image change into another here is the code i got
while true do
script.Parent.Video.Image = “http://www.roblox.com/asset/?id=8230571706 ”
wait(7)
script.Parent.Video.Image = “http://www.roblox.com/asset/?id=8228197917 ”
wait(5)
script.Parent.Video.Image = “http://www.roblox.com/asset/?id=8230571706 ”
wait(4)
script.Parent.Video.Image = “http://www.roblox.com/asset/?id=8228197917 ”
wait(5)
end
Video is image of the ui for it to change
2 Likes
Valkyrop
(aHuman)
March 24, 2022, 5:31pm
2
1.Replace wait() with task.wait() – it’s more efficient and more accurate.
2.There is an efficient way to do this, here :
local image = script.Parent.Image
while true do
local Images = {8230571706,8228197917,8230571706,8228197917}
image.Image = "rbxassetid://"..Images[math.random(1,#Images)]
task.wait(1)
end
Valkyrop
(aHuman)
March 24, 2022, 5:31pm
3
What this does is choosing a random image from that ‘Images’ table, and place the id as our Image’s ID
Valkyrop
(aHuman)
March 24, 2022, 5:34pm
4
If you wanted it with a specific order, you could use ipairs
This didn’t work but this is the output:
Players.3DRobloxGameDev.PlayerGui.Options.BooglesFrame.BooTubeAwardReveal.image.Script:6: attempt to index string with ‘Image’
Ill send you the explorer to help you.
1 Like
Valkyrop
(aHuman)
March 24, 2022, 5:35pm
6
Then replace this :
local image = script.Parent.Image
with this :
local image = script.Parent
2 Likes
This code will go through the table in order. If you want to change a duration of an image simply change it’s Waiting value to what you desire
local image = script.Parent.Image
local Images = {
{ Image = "rbxassetid://8230571706" , Waiting = 7}
{ Image = "rbxassetid://8228197917" , Waiting = 5}
{ Image = "rbxassetid://8230571706" , Waiting = 4}
{ Image = "rbxassetid://8228197917,5", Waiting = 5}
}
while true do
for i,v in ipairs(Images) do
image.Image = v.Image
wait(v.Waiting)
end
end
1 Like
Valkyrop
(aHuman)
March 24, 2022, 5:44pm
8
This would work aswell , good job.
I knew this method, I guess I didn’t fully understand him.
But both ways work.
2 Likes
I will remember to use this for more complicated stuff in the future of my game!
1 Like
Well both methods serve different purposes but it’s his choice whether he wants it to be randomized or in order
1 Like
Valkyrop
(aHuman)
March 24, 2022, 5:47pm
11
I agree, definitely his choice.
2 Likes
here is what i was making it work for if any of you wondered
3 Likes
Valkyrop
(aHuman)
March 24, 2022, 5:53pm
13
I love this design! Well done mate!
I made a pc system too in the past ,still working on it.
I had some help with the gfx from 1 of my good friends im trying to make it accurate i dont know why but i have a odd thing for windows xp even though i never used it or was born then lol
1 Like
Valkyrop
(aHuman)
March 24, 2022, 5:54pm
15
Same, it’s very nostalgic. Very.
1 Like
Very sad to im hoping to make virtual machines in it lol
2 Likes
I wonder who made the GFX it looks good.
Lol
1 Like
Valkyrop
(aHuman)
March 24, 2022, 5:57pm
18
Are you making a full PC system tho? I am curious
Yeah we are were hoping to get it out on may if were lucky Im going to message you because were kinda spamming the forum kinda lol
1 Like