I was wondering if anyone could help me? I'm trying to create a script for 2 parts where if when you touch part1 and you own a gamepass, you will be teleported to part2 If you don't own the gamepass you won't be teleported. I've tried using a free model one but it just puts me on the roof.
Make a Sever script inside part1. Put this as the code
script.Parent.Touched:Connect(function(touch) -- If player touchs part1 local gamepass = 11111 -- Change this to your gamepass's ID local plr = game.Players:GetPlayerFromCharacter(touch.Parent) --Get the player from their character since this is a server script if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, gamepass) then -- Check if the player owns the gamepass game.Workspace[plr.Name].UpperTorso.CFrame = game.Workspace.Part2.CFrame --If so Teleport them to Part2 which is the other part end end)