How can I make a gui change for everyone?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to make a GUI change for everyone in the server, in this case if I click a button to change from a light blue to a dark blue, it would change to dark blue for everyone

  2. What is the issue? Include screenshots / videos if possible!
    Listed in 1.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I’ve searched around Google, YouTube and the DevForum and have not found any solutions at all.

(I am new to the forum and this is my first post so it may be kinda messy!)

1 Like

You try something like this:

for v, player in pairs(game.Players:GetPlayers()) do
local frameToChange = player.PlayerGui
frame.BackgroundColor3 = Color3.new(1,1,0)
end

1 Like

Oh yeah, here is my current code:

taken = Color3.fromRGB(21, 88, 99)
available = Color3.fromRGB(41, 171, 191)
transition = Color3.fromRGB(85,85,85)

function Horizon()
	if button.ImageColor3 == taken then
		button.ImageColor3 = available
	else
		button.ImageColor3 = taken
		wait(5)
	end
end

button.MouseButton1Click:Connect(Horizon)

It is being used for a table seating system for one of my groups

This is a script or localScript and you can send me a screenshot from the explorer to see where is the button?

It is a script.

image

try this:

taken = Color3.fromRGB(21, 88, 99)
available = Color3.fromRGB(41, 171, 191)
transition = Color3.fromRGB(85,85,85)

function Horizon()
for v, localPlr in pairs(game.Players:GetPlayers()) do
local plrButton = localPlr.ReserviUI.Core.SeatingReservations[button.Name]

if plrButton.ImageColor3 == taken then
plrButton.ImageColor3 = available
else
plrButton.ImageColor3 = taken
end
end
end

button.MouseButton1Click:Connect(Horizon)

1 Like

Maybe you can change their GUI when you add them to the table?

I think you might’ve misunderstood what it is for, the system is a restaurant seating system for staff.

  1. They click the computer screen.
  2. The UI pops up with a seating system.
  3. They click one of the tables which turns from light blue, to dark blue.

Okay, thanks for being more specific. You might create a variable for seats / module script and when a player clicks a seat you can change variable / module script to true / false.
– Edit –
You can connect a .Changed function and change colors in GUI.
– Edit2 –
If this fixed your problem please mark it as a solution.

1 Like

Red underline.
image

put ‘Local button = script.Parent’ in the first line

image

Try this:

local button = script.Parent
taken = Color3.fromRGB(21, 88, 99)
available = Color3.fromRGB(41, 171, 191)
transition = Color3.fromRGB(85,85,85)

function Horizon()
for v, localPlr in pairs(game.Players:GetPlayers()) do
local plrButton = localPlr.PlayerGui.ReserviUI.Core.SeatingReservations[button.Name]

if plrButton.ImageColor3 == taken then
plrButton.ImageColor3 = available
else
plrButton.ImageColor3 = taken
end
end
end

button.MouseButton1Click:Connect(Horizon)

3 Likes

It works, thanks so much! t h i r t y c h a r s

:ok_hand: :ok_hand: :ok_hand: :ok_hand: :ok_hand: :ok_hand: :ok_hand: :ok_hand: :ok_hand: :ok_hand: :ok_hand: :ok_hand: :ok_hand: