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

attempt to call a number value????

Asked by 4 years ago
Edited 4 years ago
script.Parent.Text = "You have " - script.Parent.kills.Value "Kills!"

This Script inside TextLabel "Value" in ScreenGui "kills" attempts to call a number value called "kills" and its Value, while making "Value"'s Text to "You Have x Kills!" x as the number value.

Also, the error i get is the title of this question.

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

Remember that you cant join numbers with strings,so first you will need to convert your value into a string value

local Kills = tostring(script.Parent.kills.Value)
script.Parent.Text = "You have "..Kills.." Kills!"

Hope it helps

0
cool it now says "You have 0 Kills!" Jakob_Cashy 79 — 4y
Ad

Answer this question