Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why does this only update half of the text?

rs = game:GetService("ReplicatedStorage")

repeat wait() until rs:FindFirstChild("Map time")

maptime = rs:FindFirstChild("Map time")

while true do
	wait(.5)
	print(maptime.Value)
	script.Parent.Text = ("Time left: " .. (maptime.Value))
end

It prints the maptime but the text says "Time left: " and not "Time left: 200" or whatever the maptime is. Why is this?

11 comments

1

Remove the parenthesis around maptime.Value :P

0

And remove the space in the concatenating process. I don't get why you need that space.

0

^^

0

I've already tried that and it doesn't work. And the spaces just make it look better in my opinion.

0

script.Parent.Text = "Time left: " .. maptime.Value

0

Try using the PlayerGui?

0

Never mind, I realised it was changing it, only in properties however. It doesn't show the numbers on the player's screen. Why is that?

0

Try using a for loop with numbers like "for i = 200,0,-1 do" instead of a NumberValue.

0

Never mind again, the text just didn't fit in.

0

oh lol

0

Maybe try the maptime.Value without the brackets

1 answer

Well, your problem is:

("Time left: " .. (maptime.Value))

So, try to use my script! It needs to work!

-- VARIABLES
rs = game:GetService("ReplicatedStorage")
maptime = rs:FindFirstChild("Map time")

-- CODE
repeat wait() until rs:FindFirstChild("Map time")
while true do
    wait(.5)
    print(maptime.Value)
    script.Parent.Text = ("Time left: "..maptime.Value) -- You putted ("" .. (maptime.Value))
end

1 comment

0

We literally just figured it out. Don't butt in.

This discussion is preserved as it was. New answers, comments, and votes are closed.