Is there a way for the text to be updated all the time/ when the player touches any part?
I have a tycoon, where I have a surfacegui with some text in it, and the text updates according to how much money the player has, but it only updates when player touches the cash giver. If anyone could explain to me what I need to do to make the text update when the cash is updates/ when the player moves/ when the player touches any part in workspace(I have many models), then that would be great!
2 | script.Parent.Touched:connect( function (hit) |
3 | local player = game.Players:GetPlayerFromCharacter(hit.Parent) |
5 | local cash = game.ServerStorage.PlayerMoney:FindFirstChild(player.Name) |
6 | game.Workspace.Display.GUI.Amount.Text = "$ " ..cash.Value |