I have a killer game but i need two players to start the round. The round system works but the GUI says status instead of the message I wrote which is that 2 players are needed to start the game.
When there is only 1 player it just shows “status” The other GUIs work I’m not sure what I’m doing wrong.
In replicated storage the status value was changed but the GUI does not.
-- Server
if #game.Players:GetPlayers() < PlayersToStart then
repeat
print(PlayersToStart.."Players are needed to start the round!")
Status.Value = PlayersToStart.."Players are needed to start the round!"
wait(0.1)
until #game.Players:GetPlayers() >= PlayersToStart
end
--Client
local replicatedStorage = game:GetService("ReplicatedStorage")
local Status = replicatedStorage.Values:WaitForChild("Status")
Status:GetPropertyChangedSignal("Value"):Connect(function()
script.Parent.ScreenGui.GameStatus.Text = Status.Value
end)
Hey! Would you be able to add a print inside of the getpropertychanged and let me know if that prints?
And if so, are you making sure that you’re accessing the correct gui and changing the correct items text?
that wouldn’t fix the problem, but when if you’re able to use the Changed Event use it instead of GetPropertyChangedSignal.
also try to add a print after the value changes and see if the localscript detects it.
maybe cuz you’re just spamming the status value try putting the status value outside of the repeat loop
if #game.Players:GetPlayers() < PlayersToStart then
Status.Value = PlayersToStart.."Players are needed to start the round!"
repeat
print(PlayersToStart.."Players are needed to start the round!")
wait(0.1)
until #game.Players:GetPlayers() >= PlayersToStart
end
Try to change it directly from the server, it’s kind of bad, but that’s what we have
if #game.Players:GetPlayers() < PlayersToStart then
repeat
print(PlayersToStart.." Players are needed to start the round!")
local Children = game.Players:GetChildren()
for i = 1, #Children do
Children[i].PlayerGui.ScreenGui.GameStatus.Text = PlayersToStart.." Players are needed to start the round!"
end
wait(0.1)
until #game.Players:GetPlayers() >= PlayersToStart
end