Good night’s developers, i tried with different scripts make a door that needs a badge.
local Player = game.Players.LocalPlayer
local BadgeService = game:GetService(“BadgeService”)local BadgeTable = {
{
Door = game.Workspace.PLV2.BD1,
Door2 = game.Workspace.PLV3.BD2,
Door3 = game.Workspace.PLV4.BD3,
BadgeId = 2149166541,
BadgeId2 = 2149250650,
BadgeId3 = 2149504995,
}
}for LoopNum, Badge in pairs (BadgeTable) do
if BadgeService:UserHasBadgeAsync(Player.UserId,Badge.BadgeId) then
Badge.Door.CanCollide = false
end
endfor LoopNum, Badge in pairs (BadgeTable) do
if BadgeService:UserHasBadgeAsync(Player.UserId,Badge.BadgeId2) then
Badge.Door2.CanCollide = false
end
endfor LoopNum, Badge in pairs (BadgeTable) do
if BadgeService:UserHasBadgeAsync(Player.UserId,Badge.BadgeId3) then
Badge.Door3.CanCollide = false
end
end
That was an example of a script that doesn’t works