Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

This Script Doesn't let me TP with my Gamepass?

This is the script:

local passId = 1224428687 -- change this to your game pass ID.
 
function isAuthenticated(player) -- checks to see if the player owns your pass
    return game:GetService("GamePassService"):PlayerHasPass(player, passId)
end
 
game.Players.PlayerAdded:connect(function(plr)
    if isAuthenticated(plr) then
        print(plr.Name .. " has bought the game pass with id " .. passId)
    end
end)

local debounce = true
local player = script.Parent.Parent.Parent.Parent
local target = game.Workspace:WaitForChild("DJSPAWN")

script.Parent.MouseButton1Click:connect(function()
   if debounce == true then
      debounce = false
      player.Character.HumaniodRootPart.CFrame = target.CFrame * 
      CFrame.new(0,3,0)
      -- Want Cooldown?
      for i = 5,1,-1 do
         wait(1)
         script.Parent.Text = i
      end
   wait(1)
   script.Parent.Text = "Teleport to Spawn"
   debounce = true
   end
end)

it doesnt tp me for some reason Please Help!

1 answer

Line 20 HumaniodRootPart should be HumanoidRootPart.

This discussion is preserved as it was. New answers, comments, and votes are closed.