Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a public UI that appears on all clients?

I'm trying to make a kill-log style UI, where if someone kills another, everyone can see who killed who. I found out I could do this easily if the UI were to be displayed as a "server UI" but I can't figure out how to make the UI display to everyone and change as necessary. Could someone help out?

1 answer

You could use a RemoteEvent to accomplish this. Have the Client listen for the 'OnClientEvent' event, and display the GUI through that.

When firing to a Client, the server can send it to either 1 player

RemoteEvent:FireClient(User, Victim, Killer)
--User being the player to whom will receive this information. Victim being the player who died, and Killer being the player who caused said death.

Or what you want to go for, which is firing all of the clients.

RemoteEvent:FireAllClients(Victim, Killer)
--Sending the information through these parameters

Now have a local script listen for the event.

RemoteEvent.OnClientEvent:Connect(function(Victim, Killer)

local gui = script.Gui:Clone()
GUI.Parent = game.Players.LocalPlayer.PlayerGui
  
end)

1 comment

0

Dang it, you beat me to it. Lol.

This discussion is preserved as it was. New answers, comments, and votes are closed.