01 | local d = 0 |
02 | script.Parent.Touched:Connect( function (hit) |
03 | local h = hit.Parent:FindFirstChild( "Humanoid" ) |
04 | local p = game.Players:GetPlayerFromCharacter(hit.Parent) |
05 | local stats = p:FindFirstChild( "leaderstats" ) |
06 | local str = stats.Strenght |
07 | local coins = stats.Coins |
08 | if h and d = = 0 then |
09 | coins.Value = 0 + str.Value |
10 |
11 | end |
12 | end ) |
it does not add to the coins value any help is apriciated
Change coins.Value = 0 + str.Value too coins.Value = coins.Value + str.Value