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

How to make a level system using game badges?

Basically, in my game, you will have to complete a level (which is in a seperate place within a universe) and once you complete that level, you unlock a badge that allows you to go to the level you were playing before you quit the game.

If anyone could help with this, it'd be much appreciated! :)

1 comment

1

your confusing me once you get the badge you advance to the next level or you go back to your last level

1 answer

✓ Accepted answer

Well, since your question was fairly 'general', this is my method of doing that

local BadgeService = game:GetService("BadgeService")
local Badges = {
-- key= ["badgeid"] = {level=#level}
[1222324234] = {level=1},
[23333323434] = {level=2}
}
function HasBadge(p)
for i,v in pairs(Badges) do
if game:GetService("BadgeService"):UserHasBadge(p.userId, i) then
return v.level
end
	end
return 0
    end

game.Players.PlayerAdded:connect(function(p)
p.Character.Humanoid:MoveTo(game.Workspace[levels_location_tps].Position)
end)

1 comment

0

Thanks man. I reverse engineered this for my own purposes and it worked! :)

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