Players not seeing server status at the same time

Click here for my script

I don’t know if there is a problem with the game’s UI system, but I really need an urgent answer!
Anyway let me tell you my problem, I made a minigame game. You know, in every minigame game there are articles like Intermission or loading map above. I did the same in Offset, I did everything from X to Y. I also wrote the script. But! People do not see these articles at the same time. For example, I reset my character and so the text was reset. While I saw Loading Map, the other man saw Intermission. My coding is good. I am UI Designer, I make very nice design, but I have a problem while coding GUI. I would be glad if you help me. By the way, the name of the person whose help works will be in my game. Good day to all

Info of me:
I have more than 10K :robux: (Using for musics etc.)
Very Good UI Designer! :warning:
Verified Contents! :white_check_mark:
Contect me for more :iphone:

3 Likes

You can disable the “ResetOnSpawn” on your ScreenGui. We cannot help further if it’s a code issue since you’ve not provided any code.

1 Like

But even if we disabled ResetOnSpawn, we can’t see it at the same time as People.

1 Like

This may be a code issue, and we cannot help without the code.

1 Like

I just uploaded my script to topic. Look the script please, I need answer.

1 Like

Putting a serverscript in a gui is never too good of an idea, What i would advise is, have a localscript and a remotevent and fire all clients, This ensures that the script receives the same info as everyone regardless of if they reset or not.

Sorry. I don’t understand it very good. Can. you explain more?

1 Like

You should use RemoteFunctions to contact the server to check the current status of the game. A script in ServerScriptService should store what the status of the game is (Intermission, In Progress, etc), and return what the current status is. When the status changes, you can also use a RemoteEvent to FireAllClients and tell everyone the current status of the game, or loop through all the Players in the game and use InvokeClient in the existing RemoteFunction you created.

Do note, you should use a LocalScript in your TextLabel, not a Script.

Here’s an example:
LocalScript in TextLabel:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteFunction = ReplicatedStorage:WaitForChild("GameStatus") --Create a RemoteFunction in ReplicatedStorage called GameStatus

local Status = RemoteFunction:InvokeServer("GetStatus")

--Set TextLabel text based on returned Status

function RemoteFunction.OnClientInvoke(NewStatus)
    --Set the status based on the new status
end

ServerScript:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")

local RemoteFunction = ReplicatedStorage:WaitForChild("GameStatus") --Create a RemoteFunction in ReplicatedStorage called GameStatus
local Status = "Intermission 10" --The variable for the game status.

function RemoteFunction.OnServerInvoke(Player, Function) --When the Client requests the status
    if Function == "GetStatus" then
        return Status --Return the client the data.
    end
end

--When the status changes:
for _,Player in pairs (Players:GetPlayers()) do --Go through all the players.
    RemoteFunction:InvokeClient(Player, Status) --Send the data to the client
end
4 Likes

Yes, I understood a little, but I did not fully understand how to make the scripts in the photos you sent. For example, as in the first photo, you want me to create a LocalScript inside TextLabel. I created that script to create that LocalScript and run it efficiently (Script inside TextLabel)
Should I delete it, I am not well understood. Unfortunately, even if you tell me, if you have discord, will you contact me for a short time? My Discord: [LGT] 60 Fps of Kuzey # 2215

1 Like

maybe these will help

Okay Thanks! I will try it! :smiley:

1 Like