So I have a part that once you touch you teleport to another world, I used this script for it:
local TeleportService = game:GetService("TeleportService")
local placeID = 8951064375
local function onPartTouch(otherPart) local player = game.Players:GetPlayerFromCharacter(otherPart.Parent) if player then TeleportService:Teleport(placeID,player) end end script.Parent.Touched:Connect(onPartTouch)
So, I'm trying to make another teleporter where if you touch the part you also get teleported to another world, but first, you need to own some specific badges from the game to be able to teleport, how can I make it work?
Also, please explain thoroughly as I'm a very new and bad scripter lol.

3 comments
Thank you so much! Just wondering, if I want it to be multiple badges instead of just one, what edits should I do to the code?
For than you can simply add an "and" and use a new BadgeId. example: return BadgeService:UserHasBadgeAsync(player.UserId, BadgeID) and BadgeService:UserHasBadgeAsync(player.UserId, BadgeID_2)
Sorry for the late reply, thank you so much!!