Hi everyone, hope you have a nice day!
So i was scripting kinda like “round system” it basically change colors every 6 seconds and it show on the frame that color (For e.g, if the script choosed red in the color table, so it shows red in the playerGUI)
But for some reason , it doesn’t really get updated that fast
Here is the Server Script thats in ServerScriptService:
local remoteEvent = game.ReplicatedStorage:FindFirstChild("UpdateFrameColor")
local frame = game.StarterGui.RoundGUI.RoundColor
local colors = {
Color3.fromRGB(255, 0, 0), -- Red
Color3.fromRGB(255, 255, 0), -- Yellow
Color3.fromRGB(255, 176, 0), -- Orange
Color3.fromRGB(0, 255, 0), -- Lime
Color3.fromRGB(0, 0, 255), -- Blue
Color3.fromRGB(170, 0, 170), -- Magenta or lilac
Color3.fromRGB(255, 0, 191) -- Pink
}
while true do
local selectedColor = colors[math.random(1,#colors)]
remoteEvent:FireAllClients(selectedColor)
local stairs = game.Workspace.Stairs:GetChildren()
local nonMatchingStairs = {}
for _, stair in pairs(stairs) do
if stair.Color ~= selectedColor then
table.insert(nonMatchingStairs, stair)
end
end
if #nonMatchingStairs > 0 then
for _, stair in pairs(nonMatchingStairs) do
stair.Transparency = 1
end
wait(2)
for _, stair in pairs(nonMatchingStairs) do
stair.Transparency = 0
end
wait(6)
end
end
And here is the Local script that’s in StarterGUI
local remoteEvent = game.ReplicatedStorage:FindFirstChild("UpdateFrameColor")
local player = game.Players.LocalPlayer
local function onUpdateFrameColor(selectedColor)
wait(2)
local playerGui = player:WaitForChild("PlayerGui")
local frame = playerGui.RoundGUI.RoundColor
frame.BackgroundColor3 = selectedColor
end
remoteEvent.OnClientEvent:Connect(onUpdateFrameColor)
The picture:
and that’s what it shows: