I'm not sure what's going wrong
local PassId = 4835177
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local MarketplaceService = game:GetService("MarketplaceService")
local player = game.Players.LocalPlayer
local bloxy = workspace:WaitForChild("itemgiver1")
local debounce = false
script.Parent.Touched:connect(function(hit)
local user = hit.Parent
if MarketplaceService:UserOwnsGamePassAsync(user.UserId, PassId) then
if hit.Parent:FindFirstChild('Humanoid') then
hit.Parent.Torso.CFrame = CFrame.new(1999971.875, 53.506, -21.966)
hit.Parent.UpperTorso.CFrame = CFrame.new(1999971.875, 53.506, -21.966)
end
else
MarketplaceService:PromptGamePassPurchase(user, PassId)
end
end)

3 comments
the player isn't defined i think but the script wont teleport me
It is defined, what are you on about
I don't know but the script won't teleport me I'm looking for mistakes right now