How do I change the amount so that all the players money is transferred?
How do I change the amount so that all the players money is transferred? Right now it is set to 100$.
05 | script.Parent.DialogChoiceSelected:connect( function (player, choice) |
06 | if (choice = = script.Parent.Choice 1 ) then |
07 | if (player ~ = nil ) then |
08 | local stats = player:findFirstChild( "leaderstats" ) |
09 | local otherStats = player:findFirstChild( "Stats2" ) |
10 | if (stats ~ = nil and otherStats ~ = nil ) then |
11 | local playerStored = otherStats:findFirstChild( "Stored" ) |
12 | if stats:findFirstChild( "Money" ).Value > = amt then |
13 | otherStats:findFirstChild( "Stored" ).Value = otherStats:findFirstChild( "Stored" ).Value + amt |
14 | stats:findFirstChild( "Money" ).Value = stats:findFirstChild( "Money" ).Value - amt |
20 | if (choice = = script.Parent.Choice 2 ) then |
21 | if (player ~ = nil ) then |
22 | local stats = player:findFirstChild( "leaderstats" ) |
23 | local otherStats = player:findFirstChild( "Stats2" ) |
24 | if (stats ~ = nil and otherStats ~ = nil ) then |
25 | local playerStored = otherStats:findFirstChild( "Stored" ) |
26 | if otherStats:findFirstChild( "Stored" ).Value > = amt then |
27 | stats:findFirstChild( "Money" ).Value = stats:findFirstChild( "Money" ).Value + amt |
28 | otherStats:findFirstChild( "Stored" ).Value = otherStats:findFirstChild( "Stored" ).Value - amt |