The only thing that does not work is that the text of the TextBox is not being updated.
wait(2) for _,v in pairs(workspace:GetChildren()) do if v:IsA('BasePart') and not v.Name == "Terrain" then v.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player ~= nil then local cash = game.ServerStorage.PlayerMoney:FindFirstChild(player.Name) game.Workspace.Display.GUI.Amount.Text = "$ "..cash.Value end end) end end
Use the Changed Event. Basically, when the Value of the Cash changes, it will fire a function and change the text. Here is an example:
cash.Changed:connect(function() game.Workspace.Display.GUI.Amount = "$ "..cash.Value end)
What the above will do is it will update the text every time the Value is changed.