Hello! i have this script so a door goes Non-Collide for the player when they have a specific badge!
for some reason the script works inside the main game but not the sub place. Theres no errors or anything, i tried print scripts and everything and it looks like its not even preparing itself or anything? help would be greatly appreciated!
local Player = game.Players.LocalPlayer
local BadgeService = game:GetService("BadgeService")
local BadgeTable = {
{
Miku = game.Workspace.No.MikuDoor,
BadgeId = 2151280950
}
}
for LoopNum, Badge in pairs (BadgeTable) do
if BadgeService:UserHasBadgeAsync(Player.UserId,Badge.BadgeId) then
Badge.Miku.CanCollide = false
end
end
local Player = game.Players.LocalPlayer
local BadgeService = game:GetService("BadgeService")
local BadgeTable = {
{
Miku = workspace.No.MikuDoor,
BadgeId = 2151280950
}
}
for LoopNum, Badge in BadgeTable do
print("Checking badge ".. Badge.BadgeId)
if BadgeService:UserHasBadgeAsync(Player.UserId, Badge.BadgeId) then
print("Successful")
Badge.Miku.CanCollide = false
end
end