Sup scripters, what i am trying to do is when the money value changes, its gonna show the currency gui, then after 5 seconds it will disappear, very similar to gta v, but the problem is, i had the value on the text label itself, so i thought it would be a open handed value to exploiters saying (“hack the entire game here”), so i changed the value to “leaderstat” and i thought it would be more secure. Before changing it, it was working fine, no errors, not even me believed it was working, then i changed the value to the leaderstats anddddd, it stopped working, i put a print on it to test if it really worked and it printed!!!
however, this is the script
local player = game.Players.LocalPlayer
local money = script.Parent:WaitForChild("Text")
local moneyValue = player:WaitForChild("leaderstats"):WaitForChild("Money")
local countdown = 5
local lastUpdate = 0
moneyValue.Changed:Connect(function()
money.Text = "$".. moneyValue.Value
end)
money:GetPropertyChangedSignal("Text"):Connect(function()
print("text changed, now gui, please appear")
lastUpdate = os.clock()
money.TextTransparency = 0
money.TextStrokeTransparency = 0.5
wait(countdown)
if os.clock() - lastUpdate > countdown then
money.TextTransparency = 1
money.TextStrokeTransparency = 1
end
end)
just wanted to remind that the text changes, but the gui wont appear when it changes