So I can't use local scripts with proximity prompt and I saw that I could get player through server script but now it gives it to a random player and its getting really annoying. (I'm not very good at scripting) here's code :
game.Players.PlayerAdded:Connect(function(player) local debounce = false script.Parent.Triggered:Connect(function() if debounce == false then debounce = true script.Parent.ActionText = ("Steal [DISABLED]") player.leaderstats.Cash.Value += math.random(100, 1000) script.Parent.Sound:Play() wait(10) script.Parent.Sound:Stop() debounce = false script.Parent.ActionText = ("Steal [ACTIVE]") end end) end)
delete PlayerAdded function and type player inside triggered function brackets that will know what players is using ProximityPrompt, because when you use PlayerAdded and somebody will join after you it will take him and it will be giving cash to him