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 (Using for musics etc.)
Very Good UI Designer!
Verified Contents!
Contect me for more
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.
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
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