#Round System working, But the text not displaying it for some reason.
1 messages · Page 1 of 1 (latest)
have you checked if the server is changing the value at all?
so where is this script that changes the textLabel's text?
Ok let me send the update
local text = script.Parent
text.Text = game.ReplicatedStorage.Status.Value
game.ReplicatedStorage.Status.Changed:Connect(function()
text.Text = game.ReplicatedStorage.Status.Value
end)
** You are now Level 1! **
no I meant in the explorer
that is a local script
oh
like this
?
in the output is also saying this
im like begginer at scripting so i cant really
ohhh
understand what does it mean
dude ok so
you just need to turn the value you get from the BooleanValue from replicatedStorage into a string using tostring() builtin function
just say this
tostring(game.ReplicatedStorage.Status.Value)
instead of
game.ReplicatedStorage.Status.Value
I mean what do you want to happen?
let me show rq
its a round system
local intermission = 5
local roundLength = 10
local inRound = game.ReplicatedStorage.InRound
local status = game.ReplicatedStorage.Status
local function teleportPlayers(destination)
for _, plr in pairs(game.Players:GetPlayers()) do
if plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") then
local humanRoot = plr.Character.HumanoidRootPart
humanRoot.CFrame = destination.CFrame
else
plr.CharacterAdded:Wait() -- Wait for character to load if not present
local char = plr.Character
local humanRoot = char:WaitForChild("HumanoidRootPart")
humanRoot.CFrame = destination.CFrame
end
end
end
inRound.Changed:Connect(function()
if inRound.Value == true then
teleportPlayers(game.Workspace.Map1.spawnMap1)
else
teleportPlayers(game.Workspace.Lobby.LocationPart)
end
end)
local function round()
while true do
inRound.Value = false
for i = intermission, 0, -1 do
status.Value = "Game will start in "..i.." seconds"
wait(1)
end
inRound.Value = true
for i = roundLength, 0, -1 do
status.Value = "Game will end in "..i.." seconds"
wait(1)
end
end
end
spawn(round)```
and
local function round()
while true do
inRound.Value = false
for i = intermission, 0, -1 do
status.Value = "Game will start in "..i.." seconds"
wait(1)
end
inRound.Value = true
for i = roundLength, 0, -1 do
status.Value = "Game will end in "..i.." seconds"
wait(1)
end
end
end```
this part
is supposedely the one that changes the text
unless i did something wrong
hm wait you're changing a BooleanObject's Value to a string?
now i am with tostring
yeah this "Status" object you're changing the value of is just a boolean value so if you want to save the string for some reason just use a string value
let me rephrase
this is a round system right
and i want for the text to be displaying like
when the game will start or end
so why not just change the textLabel's text instead of the object's value?
isnt the script already doing this
no
local text = script.Parent
text.Text = tostring(game.ReplicatedStorage.Status.Value)
game.ReplicatedStorage.Status.Changed:Connect(function()
text.Text = game.ReplicatedStorage.Status.Value
end)
wait it
isnt
??
status.Value = "Game will end in "..i.." seconds"
look
you're changing the value of the object
not the text
np
yeah just change the textLabel's text, and the reason you can't just use the booleanObject's value is because it can only be true or false but you're setting it to a string so nothing happens
just change it to a StringValue