(Ignore the tween position, they aren't part of the script that I'm asking..)
local TextLabel = script.Parent.Main.TextLabel local Main = script.Parent.Main local line = script.Parent.Frame local MainVisible = 0, 0,0.447, 0 local LineVisible = 0.004, 0,0.522, 0 local MainUnv = -0.155, 0,0.447, 0 local LineUnv = -0.24, 0,0.53, 0 local Points = game.Players.LocalPlayer.leaderstats.Points.Value wait(30) Main:TweenPosition(UDim2.new(0, 0,0.447, 0)) wait(1) line:TweenPosition(UDim2.new(0.004, 0,0.522, 0)) while true do wait(0.5) TextLabel.Text = Points.."$" end
So as you can see here, the text depends on the value of your points. But, it updates once then it stops the update, is there a way to keep it updated? Thank you!
local TextLabel = script.Parent.Main.TextLabel local Main = script.Parent.Main local line = script.Parent.Frame local MainVisible = 0, 0,0.447, 0 local LineVisible = 0.004, 0,0.522, 0 local MainUnv = -0.155, 0,0.447, 0 local LineUnv = -0.24, 0,0.53, 0 local Points = game.Players.LocalPlayer.leaderstats.Points wait(30) Main:TweenPosition(UDim2.new(0, 0,0.447, 0)) wait(1) line:TweenPosition(UDim2.new(0.004, 0,0.522, 0)) game:GetService("RunService").Heartbeat:Connect(function() TextLabel.Text = Points.Value end)
You were referencing the value once, this should fix it.
local TextLabel = script.Parent.Main.TextLabel local Main = script.Parent.Main local line = script.Parent.Frame local MainVisible = 0, 0,0.447, 0 local LineVisible = 0.004, 0,0.522, 0 local MainUnv = -0.155, 0,0.447, 0 local LineUnv = -0.24, 0,0.53, 0 wait(30) Main:TweenPosition(UDim2.new(0, 0,0.447, 0)) wait(1) line:TweenPosition(UDim2.new(0.004, 0,0.522, 0)) while true do wait(0.5) local Points = game.Players.LocalPlayer.leaderstats.Points.Value TextLabel.Text = Points.."$" end
Now the Points is getting updated too! If it wasent in the loop it wont update the value.