Hi I have asked a few questions about this gui that I have been trying to get to open when prompted to by a serverscript. I have been told to use remote events and the playerGui, both of which I am doing, but still with no luck. I am not getting any error messagaes but all of my prints throughout my script are running so I am guessing it is something wrong with either my local or server script.
Server Script
local t1 = game.Teams.T1 local t2 = game.Teams.T2 local t3 = game.Teams.T3 local t4 = game.Teams.T4 local zoneBind = game:GetService("ReplicatedStorage").ZoneBind local guiStart = game:GetService("ReplicatedStorage").TeamGuiStart while true do --wait for players while true do wait(5) contestants = {} for _, player in pairs(game.Players:GetPlayers()) do if player and player.Character then local humanoid = player.Character:WaitForChild("Humanoid") if humanoid and humanoid.Health > 0 then table.insert(contestants, player) end end end if #contestants == 1 then break end end --open screen gui print("The") guiStart:FireAllClients() print("Lazy") --zones run zoneBind:Fire() print("Dog") --victor shown while true do wait(5) end print("Jumped") --return to lobby --wait intermission wait(30) end
I'm not done with it yet, the part that isn't working is the line~~~~~~~~~~~~~~~~~guiStart:FireAllClients() ~~~~~~~~~~~~~~~~~. I get all of my prints except Jumped, which is fine because it should be waiting for that loop anyway.
Local Script
local event = game:GetService("ReplicatedStorage").TeamGuiStart function teamFrameOn() local teamFrame = game.Players.LocalPlayer.PlayerGui.GUI teamFrame.Enabled = true end event.OnClientEvent:connect(teamFrameOn()
I really don't know the problem when I launch a test and go into my player's playerGui and enable the GUI like this script should be doing it brings the gui up so I'm guessing that's the problem. Thank you! (P.S. I might ask a few more questions today as I promised my partner I would be done with my part by today, Thank you to everyone on the site for being so helpful.)
Try this at line 28, server script
local plrs = game.Players:GetChildren() for i = 1, #plrs do event:FireClient(plr[i]) end