How do I make a Screen GUI that shows for everyone through a server script?

That’s him deleting his comment. Roblox does that.

1 Like

Did you try my suggestion yet. If it didn’t work, tell me the error.

I am going to try it out right now.

local timeRemaining = 10
 while timeRemaining > 0 do
 print("Seconds remaining: " .. timeRemaining)
 wait(1)
 timeRemaining = timeRemaining - 1
 end
gui.transparenty = 0

again i am not really good at scripting but you can do a countdown

1 Like

Only if it did error. You are setting a UI in StarterGui, which means only new players or players that reset (I think) would get this UI. He should probably just loop the players and change it/fire the event.

1 Like

and no i did not local what the gui,its just a example

Looping would lower the performance rate and add clones every less than a second into the player gui. It’s not ideal to .

image

This is what I got. I put the local script under the textbutton in screengui.

Did you add a remote event to replicated storage

You didn’t add a remote event to replicated storage.

make a remote event? infinite yield means its stuck on that line

Yes, but it still tells me that error?

Here is a pic:
image

Oh, my bad I accidentaly said remove event. Change it to RemoteEvent

1 Like

remove event not remote…small detail

I always rush when typing so I could make some mistakes,

You missed the argument of the client in your function. To make events with Gui , you need to do them Only in LocalScripts. Because ONLY clients can have the access to the Gui.

-- LocalScript (it can be in StarterGui for example).
local remoteEvent = game.ReplicatedStorage.RemoteEvent
local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

remoteEvent.OnClientEvent:Connect(function(plr)
PlayerGui.ScreenGui.TestFrame.Visible = false
end)

And you can fire this event from the server.

--Script in ServerScriptService 
local remoteEvent = game.ReplicatedStorage.RemoteEvent
remoteEvent:FireAllClients()

Oh, good idea actually. I’ll make sure to change that every time I’m trying to help someone.

I have fixed your typo but now when I run the function, absolutely nothing happens.

can you tell me what you are using it for and what triggers it ;-;

Listen to @Chemdello and do what he says. I had forgot a server script cannot access a gui.