Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How could i make group cash benefits?

Asked by 4 years ago

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!

0
You need to include the script you already have in order for us to be able to guide you. Torren_Mr 334 — 4y
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. DiogoBr34 32 — 4y
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) THELFCMAN 9 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

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.

Ad

Answer this question