Im getting this error when I run this script Players.Player.PlayerGui.Shop.Frame.Cash.LocalScript:2: attempt to index local 'property' (a number value) can anyone explain how to fix the script and what it means?
1 | script.Parent.Parent.Parent.Parent.Parent.stats.money.Changed:connect( function (property) |
2 | script.Parent.Text = "$" ..property.Value |
3 | end ) |
If in case your stats is In the player, Like this Diagram given that you have player = game.Players.LocalPlayers. Player --> Stats.money And Money is a int/double Value And the script is within the model then Then
1 | player.stats.money.Changed:connect( function () |
2 | script.Parent.Text = "$" .. player.stats.money.Value -- the first two parts of this code means that the ---------script is under the an Object and this Object above it contains a TextLabel, called Text. |
3 | --as a result The Text becomes this money.Value. |
4 |
5 | end ) |