Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 7 years ago

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

Log in to vote
0
Answered by 7 years ago

Line 20 HumaniodRootPart should be HumanoidRootPart.

Ad

Answer this question