Hello world, in my game there is a part called MoneyGiver, and when a player touches it, he gets money, but if 2 players touch the part at the same time, just one of them gets the money, why? also, Sabailurize (A Helper form this community) changed this script to make it work, thanks Sabailurize.
But now im trying to make it work soo, even when 2 or more players touches it, they both get that money: (im not sure, but ”Touches” is not a word, but you get it)
local waittime = 10
local isTouched = false
script.Parent.Touched:Connect(function(hit)
if hit and hit.Parent:FindFirstChild("Humanoid") and not isTouched then
isTouched = true
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
wait(1)
player.leaderstats.Money.Value += 10
wait(waittime)
isTouched = false
end
end)

2 comments
Interesting,thanks.
That joke whit Elon Musk :D