Script works in main game but not in Sub-place

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
1 Like

Where is this LocalScript located?

It’s in starter player scripts

Could you tell me what this prints?

Code:

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

It didn’t work, no errors again, I’m not sure why it isn’t working at all.

Can you check if the script is even running? (with a print statement)

Could you send me a picture of the explorer?

Yes I stated i already did that

Okay, here you go!!

image
image