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

How to make all players see a GUI message from server?

For example if my game changes map, how do I make a GUI pop up on every player's screen saying the map name, and then deleting the GUI seconds later? (How to make the GUI pop up from a server script) I don't think it's remote events or remote functions?

(The game is FE)

3 comments

0

I think you should use remove events?

0

You would have to use Remote Event and FireAllClients(); Let me know if you need an example. I think it is pretty straight forward but if you do need an example, do let me know. 

0

Also, you don't want to utilize Server Script for any Graphic User Interface, simply because it isn't a good practice. Always use Local Script for anything related to Guis.

1 answer

✓ Accepted answer

You can use RemoteEvents to tell the clients to unhide a gui with the message and change its text, and also after how many seconds it should hide it again.

Example:

Server:

local msgRemote = Instance.new("RemoteEvent") --or do it in explorer
msgRemote.Parent = game.ReplicatedStorage
msgRemote.Name = "msgRemote"

--when displaying a message for 5 seconds:
msgRemote:FireAllClients("Game will start in 5 seconds! Prepare!", 5)

Client:

local msgRemote = game.ReplicatedStorage:WaitForChild("msgRemote")

local gui = script.Parent

msgRemote.OnClientEvent:Connect(function(text, time)
	gui.Visible = true
	gui.MessageLabel.Text = text
	wait(time)
	gui.Visible = false
end)

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