I'm currently working on a sports game and I have a scoreboard. I'm stumped on how to make the scoreboard display the actual score. I have a number value with the score that works when scoring. So that'd have the score in it, but no matter what I try I can't seem to get it to display. The scoreboard TextLabel is in startergui and the numbervalue is in replicated storage if that helps any. RedScore is the number value.
local ReplicatedStorage = game:GetService("ReplicatedStorage") local displayValues = ReplicatedStorage:WaitForChild("DisplayValues") local status = displayValues:WaitForChild("RedScore") local textLabel = script.Parent local function updateText() textLabel.Text = status.Value end status.Changed:Connect(updateText) updateText()
The problem is that you are trying to set a string value (the textlabel's text) to a number value. To fix this, simply put a tostring() around status.Value. So your new 8th line would be
textLabel.Text = tostring(status.Value)
tostring() simply converts anything that can be a string into a string. But since you're using a number value, you shouldn't have to worry.