Starter GUI showing server values

I’m currently coding for a GUI that shows people who join a “Party” and also can join or leave the party.
I’m able to get it to show up for an individual person with no problem. However I was struggling to get the same values to show for all players. I tried using a bindable event that seems to fire on the local script, but doesn’t actually run.

Local Script

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService('Players')
local TeamString = ReplicatedStorage.TeamString
local MyPlayer = game.Players.LocalPlayer
local StringEvent = ReplicatedStorage.StringEvent

local TeamsFrame = script.Parent
local Party1 = TeamsFrame.Party1
local P1Join = Party1.Join

local function OnActivated()
    TeamString.Value = MyPlayer.Name
    StringEvent:Fire()
end

P1Join.Activated:Connect(OnActivated)  -- to join team

Script – I tried getting it to work two ways here, on replicated value changed and the bindable event

Local Script

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TeamString = ReplicatedStorage.TeamString
local StringEvent = ReplicatedStorage.StringEvent

local TeamsFrame = script.Parent
local Party1 = TeamsFrame.Party1
local P1Join = Party1.Join

StringEvent.Event:Connect(function()
	print("hello")
	P1Player1.Text = TeamString.Value  -- Player 1 team slot
end)

TeamString.Changed:Connect(function()
	P1Player1.Text = TeamString.Value  -- player 1 team slot
end)

How can I get the string value to show up for all players when someone joins a team in the gui?

1 Like

I believe you want the string of all teammates to show up for everyone? If so then you would need to fire a remote event and inside of that remote event you would need to loop through everyone in the team and set the text for each of them.

1 Like

If the join stuff is dealt with a server script and you want it to send to everyone you could just use the :FireAllClients with a remote event but if like what @SkeletorAngel you would need to go through and check if they are on the tema.

Also just to add onto it as well like you said in the title about the starter gui if you want it to like say it in the starter gui I believe you can just change info inside the starter gui via a server script and then it should just show everyone who joins.

The reason I didn’t put everything in a server script is because I was using local player in my code which doesn’t work for server scripts. I will look into :FireAllClients and using a remote event. Maybe even changing into a for loop to get around local player.