I'm working on a tycoon and I have some testers that I want to receive cash instantly when they join so that the testing is faster. Any suggestions?
So lets say that cash is located inside the player under leaderstats and is named Money.
First we need to set up a playeradded event, then we check if the player's name is one of your testers, if so we can set the player's money.
game.Players.PlayerAdded:Connect(function(plr) if plr.Name=="DanzLua" or plr.Name=="JoshGamingHQ1" then plr.leaderstats.Money.Value=1000000 end end)
If the money value isn't located inside leaderstats then simple change the path to it after the if statement.
You can also check for their user ids instead of their username using the UserId property of player in the if statement.
We can include it when you add the leaderstat.
game.Players.PlayerAdded:Connect(Function(Player) local leaderstats = Instance.new("BoolValue") -- It doesn't have to be a bool value, just using it as a place holder. leaderstats.Parent = Player local cash = Instance.New("IntValue") cash.Parent = leaderstats cash.Value = 500 -- This is the value they will start at. end