So I want to make a system that when a player reaches a benchmark in my game, they get a one-time reward and a badge. I would make it so that if the player has the badge, they cannot claim the reward again.
I’m not very good with data stores, so this is the easiest way to do it. Are there any problems with using this method to save player data?
You won’t need to use any data stores (except for adding the rewards and making their stats save)
To check if a player has a badge, this is how you do it.
local BadgeService = game:GetService("BadgeService")
local BadgeId = 123
game:GetService("Players").PlayerAdded:Connect(function(player)
if BadgeService:UserHasBadge(player.UserId, BadgeId) then
print("The user has this badge")
else
print("The user does not have this badge")
end
end)
Read the post again, he said he didn’t want to use datastores. The actual question was “Are there any problems with using this method to save player data?”.