I’m working on a menu for my cafe group and I want the menus to change to a different decal every so (would use a wait variable) and I’m having trouble with the script to do this. I have looked on DevFourm and DevHub for answers.
1 Like
local waitTime = 20 --how often the image changes
local decal = workspace.Decal --your decal here
local decals = {
'1524521',
'21521521',
'18250211'
}
while wait(waitTime) do
local randomDecal = math.random[1, #decals]
local chosenDecal = decals[randomDecal]
decal.Texture = chosenDecal
end
Would be something like this,
Tho I don’t recommend using while wait loops too often.
Instead of doing while wait(waitTime) do
, make it while true do
and put the wait(waitTime)
on a separate line.
2 Likes
Hello I want ask one question. What if I want make it frame?