#Round System working, But the text not displaying it for some reason.

1 messages · Page 1 of 1 (latest)

oblique palm
#

ive tried everything it just doesnt work, let me send the script

cobalt tree
#

have you checked if the server is changing the value at all?

smoky vapor
# oblique palm

so where is this script that changes the textLabel's text?

oblique palm
#

Ok let me send the update

oblique palm
dull coralBOT
#

studio** You are now Level 1! **studio

smoky vapor
#

no I meant in the explorer

oblique palm
#

that is a local script

#

oh

#

like this

#

?

#

in the output is also saying this

#

im like begginer at scripting so i cant really

smoky vapor
#

ohhh

oblique palm
#

understand what does it mean

smoky vapor
#

dude ok so

#

you just need to turn the value you get from the BooleanValue from replicatedStorage into a string using tostring() builtin function

oblique palm
#

oh

#

okay

#

...how do i do that

smoky vapor
#

just say this

tostring(game.ReplicatedStorage.Status.Value)
#

instead of

game.ReplicatedStorage.Status.Value
oblique palm
#

okay

#

let me check

#

😭

#

i mean

#

it did change the

#

text

#

...to true

smoky vapor
#

I mean what do you want to happen?

oblique palm
#

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

smoky vapor
#

hm wait you're changing a BooleanObject's Value to a string?

oblique palm
#

now i am with tostring

smoky vapor
#

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

oblique palm
#

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

smoky vapor
#

so why not just change the textLabel's text instead of the object's value?

oblique palm
#

isnt the script already doing this

smoky vapor
#

no

oblique palm
#
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

#

??

smoky vapor
#
status.Value = "Game will end in "..i.." seconds"
#

look

#

you're changing the value of the object

#

not the text

oblique palm
#

hm

#

let me check rq

#

btw thanks for helping

smoky vapor
#

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

cobalt tree
#

just change it to a StringValue