local replicatedstorage = game:GetService("ReplicatedStorage")
local status = replicatedstorage:WaitForChild("StatusValue")
math.randomseed(tick())
while true do
for i = 10,0,-1 do
status.Value = "Intermission:"..i
wait(1)
end
status.Value = "Loading New Map"
Number = math.random(1,1)
if Number == 1 then
game.ReplicatedStorage.StatusValue2.Value = "Dystopian Plains"
local Clone1 = game.ServerStorage.DYSTPLAINS:Clone()
Clone1.Parent = game.Workspace
end
for _,plr in pairs(game.Players:GetPlayers()) do
plr.TeamColor = BrickColor.new("Really red")
plr:LoadCharacter()
end
for i = 120,0,-1 do
status.Value = "Game In Progress:"..i
wait(1)
end
for _,plr in pairs(game.Players:GetPlayers()) do
plr.TeamColor = BrickColor.new("White")
plr:LoadCharacter()
end
end
So this script keeps track of time, loads maps once the intermission is done, and teleports players with teams.
Now, I have two labels on the screen. One's text is based on StatusValue (A string Value) the other's text is based on StatusValue2( another string Value). The one based on Status value 2 is the one i am having problems with.
Before a server starts, the value of StatusValue2 is "Testing". when the script goes and Loads the map, it should change status value 2 to "Dystopian Plains". It does, for only a fraction of a second.When the code then changes the players team colr to "Really Red", the label on the screen displays "Testing", as if nothing happens.
If you have the time, please tel me what is wrong with this script.
BTW this script is in the serverscriptservice

1 comment
Thanks! I saw a fault in the script managing the textlabel and just deleted the script. I'll just have this script manage the label directly.