So I have a script, but I want it to only work if the player owns a game pass.
local TeleportService = game:GetService("TeleportService")
local placeID_1 = 0000000000
local function onPartTouch(otherPart)
local player = game.Players:GetPlayerFromCharacter(otherPart.Parent)
if player then
TeleportService:Teleport(placeID_1, player)
end
end
script.Parent.Touched:Connect(onPartTouch)
Anybody know how to do this?

2 comments
^^ GetService should also be used the "Players" and you're missing the (hit) variable in the connection
SerpentineKing Im not missing nothing, Try the Script in game not in Studio, it work perfect.