Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How could i make group cash benefits?

I have a script that gives players in my group cash on when they join my game but the problem is if they leave then rejoin they get another set of cash, I need to know how to stop them receiving the cash after they already have, any help is appreciated!

3 comments

0

You need to include the script you already have in order for us to be able to guide you.

0

Maybe create a bool value like "ReceivedGroupCash" and use datastore on it so if its true: player received the money it dont gonna give him the money and else it gonna give him the money.

0

game.Players.PlayerAdded:Connect(function(newPlayer) if newPlayer:IsInGroup(5567776) then wait(3) newPlayer.leaderstats.Cash.Value = newPlayer.leaderstats.Cash.Value + 500 end end)

1 answer

✓ Accepted answer

You'll need to use DataStores for this. Basically every player will save a BoolValue which tells you if they've received cash or not. If it's false and they're in your group, you give them the cash. After you give them the cash, the value turns true, so next time they join they won't get the cash.

This discussion is preserved as it was. New answers, comments, and votes are closed.