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

How do I display a NumberValue on a SurfaceGUI?

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

3 comments

0

What is the error

0

The text on the SurfaceGUI wouldn't show up

0

Please use a code block for your code.

1 answer

✓ Accepted answer

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

7 comments

0

Squidiskool, I tried your suggestion, but the SurfaceGUI still appears blank.

0

Does workspace.Model.Sign.Value exist?

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

0

This won't work on a localscript.

0

Also is "Sign" a value? Is "Value" a value? If so then put .Value after Value.

0

no only value is a value

0

ok i changed it from a localscript to a normal script and it works now! thanks squidiskool!

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