Help with converting intvalue into textlabel

I am currently trying to make it so that when an invalue located inside of the player changes, a textlabel changes accordingly. This is in a local script inside of StarterPlayerScripts:

value.Changed:Connect(function(newValue)
	gui.Text = tostring(newValue)
end)

This is different to the other posts on this because this is inside of a single player game so I believe local scripts can do this.

Please let me know if you see a mistake or know how to fix this!

im not sure if newValue returns the value since ive never done it this way before, you could try replacing newValue in line 2 with value.Value.

If that doesnt work, try adding print statements to see what runs and what the variables are. And if the TextLabel is in an ui make sure you’re editing the PlayerGui and not StarterGui

Thanks!
I forgot to do PlayerGui instead of StarterGui but the newValue did work.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.