Ad
Log in to vote
0

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

Asked by 4 days 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!

Hi.

Looks like you're using an ad blocker.

That's fine...

No, it really is.

Just, I mean, we put a lot of work into this site, you know?

It would be really really appreciated if you would turn off your ad blocker for our website...

We tried really hard to make our ads as unobtrusive as possible.

If you really hate ads, would you consider a $2 donation via Patreon?

Here's the link.

We love you. We hope you love us too.

.

..

...

Now back to your regularly scheduled Scripting Helpers....

...

..

.

1 answer

Log in to vote
0
Answered by 4 days ago

Line 20 HumaniodRootPart should be HumanoidRootPart.

Ad

Answer this question



Ad