Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does this only update half of the text?

Asked by
LawlR 182
6 years ago
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?

1
Remove the parenthesis around maptime.Value :P DeceptiveCaster 3761 — 6y
0
And remove the space in the concatenating process. I don't get why you need that space. DeceptiveCaster 3761 — 6y
0
^^ hellmatic 1523 — 6y
0
I've already tried that and it doesn't work. And the spaces just make it look better in my opinion. LawlR 182 — 6y
View all comments (7 more)
0
script.Parent.Text = "Time left: " .. maptime.Value hellmatic 1523 — 6y
0
Try using the PlayerGui? DeceptiveCaster 3761 — 6y
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? LawlR 182 — 6y
0
Try using a for loop with numbers like "for i = 200,0,-1 do" instead of a NumberValue. DeceptiveCaster 3761 — 6y
0
Never mind again, the text just didn't fit in. LawlR 182 — 6y
0
oh lol DeceptiveCaster 3761 — 6y
0
Maybe try the maptime.Value without the brackets MajinBluee 80 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

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
0
We literally just figured it out. Don't butt in. DeceptiveCaster 3761 — 6y
Ad

Answer this question