Ad
Log in to vote
1

How do I display a NumberValue on a SurfaceGUI?

Asked by 4 days ago
Edited 2 days ago

I'm making a gameshow and wanted the stands where the contestants are to have their points displayed. I made the stands and added a simple Surface GUI and TextLabel. Then inside the TextLabel, I added this local script code, but it didn't work.. Please help.

while wait(0.01) do

script.Parent.Text = workspace.Model.Sign.Value

end
0
What is the error Jackmods_YT -12 — 3d
0
The text on the SurfaceGUI wouldn't show up WhatsSamYT 5 — 3d
0
Please use a code block for your code. 2_MMZ 163 — 3d

1 answer

Log in to vote
0
Answered by 3 days ago
Edited 3 days ago

Use tostring. The NumberValue is a Number, and the "Text" property of the TextLabel is a string.

while wait(0.01) do
    script.Parent.Text = tostring(workspace.Model.Sign.Value)
end
0
Squidiskool, I tried your suggestion, but the SurfaceGUI still appears blank. WhatsSamYT 5 — 2d
0
Does workspace.Model.Sign.Value exist? squidiskool 185 — 2d
0
Squidiskool, yeah, I have the model in the workspace and in the model is the sign. In the sign there is a value and surfaceGui. In the surfaceGUI there is a Textlabel and the localscript WhatsSamYT 5 — 1d
0
This won't work on a localscript. squidiskool 185 — 1d
0
Also is "Sign" a value? Is "Value" a value? If so then put .Value after Value. squidiskool 185 — 1d
Ad

Answer this question