Cash to Collect button Not claiming cash?
Hey there, I have an issue with my cash to collect button. There is not errors.
Here is the script:
02 | script.Parent.BillboardGui.TextLabel.Text = "Cash to collect : $" .. tostring (script.Parent.Parent.Parent.CashToCollect.Value) |
05 | script.Parent.Touched:Connect( function (Hit) |
06 | local Player = game.Players:GetPlayerFromCharacter(Hit.Parent) |
08 | local Human = Hit.Parent:FindFirstChild( "Humanoid" ) |
10 | if Hit.Parent.Humanoid.Health > = 1 then |
11 | if Player and Player = = script.Parent.Parent.Parent.Owner.Value then |
12 | local Money = script.Parent.Parent.Parent.Owner.Value:FindFirstChild( "leaderstats" ):FindFirstChild( "Cash" ) |
14 | Money.Value = Money.Value + script.Parent.Parent.Parent.CashToCollect.Value |
15 | script.Parent.Parent.Parent.CashToCollect.Value = 0 |