Okay, so whenever I earn money in my game it updates in the value but not in the Gui. Here is the script:
Money = script.Parent.Parent.Money local s = Instance.new("ScreenGui") s.Parent = script.Parent local m = Instance.new("TextLabel") m.Parent = s m.BackgroundTransparency = 1 m.Position = UDim2.new(0,0,0,400) m.Size = UDim2.new(0,200,0,50) m.Font = "Legacy" m.FontSize = "Size24" m.TextColor3 = Color3.new(36,216,48) m.Text = "$" .. Money.Value
If you can help, thank you!
Using the code you already provided, we can add a .Changed
event that runs whenever Money's value changes.
Money = script.Parent.Parent.Money local s = Instance.new("ScreenGui") s.Parent = script.Parent local m = Instance.new("TextLabel") m.Parent = s m.BackgroundTransparency = 1 m.Position = UDim2.new(0,0,0,400) m.Size = UDim2.new(0,200,0,50) m.Font = "Legacy" m.FontSize = "Size24" m.TextColor3 = Color3.new(36,216,48) m.Text = "$" .. Money.Value Money.Changed:connect(function() -- When money's value changes, run the contained function m.Text = "$"..Money.Value -- Changes the text to reflect the change end) -- End the function