I'm trying to get some Text to change whenever a Value is changed. So far I have this but it doesn't work.
local Text = script.Parent.Text local Title = script.Title.Value local function updateText() Text = Title end status.Changed:Connect(updateText) updateText()
The code below is a better and shorter way to do functions based on things such as .Changed or .Touched or .MouseButton1Click, and etc. I've labeled parts of the script that tell you what it does. Hope this helped!
local textLable = script.Parent --Makes a variable for the text local title = text.Title -- Makes a variable for the Title/Value textLable.Text = title.Value -- Sets the text to the value when the script is first ran title.Changed:Connect(function() -- Detects when the titles value changes textLable.Text = title.Value -- Sets the text to the value end) -- Ends the function