FireAllClients a specific player?

  1. What do you want to achieve? Keep it simple and clear!
    Basically I’ve been using FireAllClients to pass information from server to client,(well not rlly information since you don’t need to). However is there any way to FireAllClients something about a specific player?

  2. What is the issue? Include screenshots / videos if possible!
    I don’t know how to show a specific player to all clients.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Couldn’t find any solutions about this.

Basically, I’m using a remote event to FireAllClients. On the client, I get the userID of a specific player, in this case the winner and show their profile. The problem is that FireAllClients doesn’t require a specific argument to pass through, which means I have no way of showing the profile of the winner. Is there any way to show something to all clients about a player?

I am using an ignore player list, but that doesn’t help. Technically it could somehow.

u can loop through each player and fire them an event

for _, Player in pairs(game.Players:GetPlayers()) do
    event:FireClient(Player, --[[ ARGUMENTS HERE]]--)
end

That’s kinda what I’m doing right now. However, do you just pass through your argument in this case,
plrs[1], which fires to all clients? Does that argument only show the player who actually matches that. So if you’re the winner it actually shows your profile to everyone?

A loop through every player could be used.

But can’t you just write a parameter

FireAllClients(here)

no the player with the index for example first index is the first player if you fire it with the index then only the player in the array position with that index will only receive the changes

I’m not sure I understand. This what I’m doing so far, however I think it ignores the player rather.

for _v in pairs(game:GetService("Players"):GetPlayers()) do
		if _v in pairs ~= plrs[1] then
             game.ReplicatedStorage.Winner:FireAllClients(_v, plrs[1])
    end
end

and you could always make a value of the player name you wanted to display and then find them in playerservice with their value

like

game.Players:FindFirstChild(Value.Value)
1 Like

That’s not the problem here though. I think I confused you or maybe I confused myself.

Plrs[1]… is the winner

I’m trying to fireallclients Plrs[1] profile. So basically everyone is able to see the winner’s profile.

On a local script, I would just do it normally and grab the player’s image.

So you are attempting to tell every player who the winner is?

If so you should do the following:

game.ReplicatedStorage.Winner:FireAllClients(plrs[1])

This will send a message to every client via the “Winner” RemoteEvent with the argument of plrs[1].

so you are trying to get the player by its index? it would work neither but it would only display the first player in the players table

Oh, it was that simple. I swear I tried it before and it didn’t work.

1 Like

Yes, but the player by its index is just the winner.

Yeah, you just need to tell the client event the player’s name.

Possibly you might’ve misspelled something, if my solution worked for you, marking it as the solution would be greatly appreciated. :smiley:

1 Like