I am making an indiana jones themed adventure game and am trying to make an extra lives GUI that changes to an int value when the int value changes but for some reason the GUI text is not switching values. I get no error either.
local rtl = script.Parent.RealTimeLives local el = script.Parent.ExtraLives local healthbars = script.Parent.HealthBars local elt = healthbars.ExtraLivesText.Lives.Text el.Changed:Connect(function() wait() elt = "+"..el.Value end)
try adding tostring() to 'el.Value' on line 8
local rtl = script.Parent.RealTimeLives local el = script.Parent.ExtraLives local healthbars = script.Parent.HealthBars local elt = healthbars.ExtraLivesText.Lives.Text el.Changed:Connect(function() wait() elt = "+".. tostring(el.Value) end)
use a tostring(). it casts the input to a string.
local a=1 print(tostring(a))