I want to give the player 10 Dosh when a mob is killed in my tower defense game. This is how I am trying to do it:
newMob.Humanoid.Died:Connect(function()
newMob:Destroy()
local player = map.Player1.Value.Value
local money = game.Players:FindFirstChild(player).Dosh.Value
local round = workspace.GameValues.Round.Value
print(money)
money += 10*round
print(money)
end)
The first print is the players money before being added, the send print is that value plus 10.
However, the players dosh
does not actually go up by 10, and whenever another mob is killed right after the first, it will print the same values as the first mob.