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

Help with equaling values to textLabels help???

Asked by 5 years ago

Need help with equialing IntValues value being equal to TextLabel Text

script.Parent.Value = script.Parent.Parent.Parent.PERCENTAGE.Text
0
Any errors? karlo_tr10 1233 — 5y
0
no Vortex_Vasne 89 — 5y
0
what type of script are you using try using a local script WideSteal321 773 — 5y

4 answers

Log in to vote
0
Answered by
Knqe 23
5 years ago

I believe you use tonumber.

script.Parent.Value = tonumber(script.Parent.Parent.Parent.PERCENTAGE.Text)
0
Nope Vortex_Vasne 89 — 5y
Ad
Log in to vote
0
Answered by
pwx 1581 Moderation Voter
5 years ago
Edited 5 years ago

If you are converting it to a string, it should actually be to string.

script.Parent.Value = tostring(script.Parent.Parent.Parent.PERCENTAGE.Text)
0
nope Vortex_Vasne 89 — 5y
Log in to vote
0
Answered by
Farsalis 369 Moderation Voter
5 years ago

Have you made sure, that the Text in text-label, is an Int? aka.(A Whole Number!)..e.g(1, 2, 3) not 1/2, 1/6, and the such. @Knqe Yes, you can convert any string number, from string format to number format. But from what it says.."PERCENTAGE". You need to change IntValue, to NumberValue.

Hope This Helped!

Log in to vote
0
Answered by 5 years ago

None of this worked for me im using values to addon to the textlabel but it wont work

Answer this question