this is a module script
to make it work you need to understad correctly how to use them
and how to use values inside them [ called via Local Scripts]
– Local script –
local players = game:GetService("Players")
local player = players.LocalPlayer or players.PlayerAdded:Wait()
local RS = game:GetService("ReplicatedStorage")
local PlrGui = player:WaitForChild("PlayerGui")
local imagesModule = require(RS:WaitForChild("ImagesMod")
local number = 0
local function ChangeNumbers()
number = number + 1 -- will increase the number count by +1
if number == 1 then
PlrGui:WaitForChild("List_Dots").Image = imagesModule[number]
else if number == 2 then
PlrGui:WaitForChild("List_Dots").Image = imagesModule[number]
else if number == 3 then
PlrGui:WaitForChild("List_Dots").Image = imagesModule[number]
else if number > 3 then
number = 0 -- RESETS the display, since number is 0, you can change this
end
end
end
end
end
ChangeNumbers() -- +1
print"the number was changed..."
print"waiting 2 seconds before changing again"
task.wait(2)
ChangeNumbers() -- +1
print"number will be changed last time after 2 seconds"
task.wait(2)
ChangeNumbers() -- +1
print"Done"
-- PLEASE --
make sure this is inside a MODULE script [INSIDE REPLICATED storage]
or else everything will explode in the game and will not work properly since i already created references above
local imagesMod = { -- please, again, make sure to insert your own images-
[3] = "11330835893", -- Three Dots -- MAKE SURE to put your own IDS from roblox
[2] = "11330849100", -- Two Dots -- change it
[1] = "11330850566", -- One Dot -- change it
}
return imagesMod
alright lemme explain the imagesModule[number]
when the script starts, it will increase the numbers automatically ( if everything is alright and you dind’t missed a single variable) by default, after a few seconds, it will print and show the image changing (image and number too)
some explanation:
this imagesModule[number] means:
imagesModule
<< The reference of the module, the variable itself, since a variable is just a mere reference
[number]
means, ACCORDING to the number displayed in the script
then the script will search INSIDE THE imagesModule the NUMBER displayed
that means, if this number doens’t exist, then it will thrown some error…
and after a few seconds, the number will change, for the sake of this ‘‘tutorial’’ and explanation
this was the result:
as you can see, i uploaded 3 images, this is how the template should be, kinda something like that, i tested and the image change slowly, also i’m using A SINGLE IMAGELABEL thing, CALLED List_Dots
this is very efficient since you will only change IDS and not using alot of ‘‘Frames’’ or duplicates of imagelabel
also you noticed the ‘‘ImageLabel’’ thing, yea, place it on StarterGui
don’t forget about the module inside Replicated storage
if something goes wrong, paste all script here and i will check whats wrong