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

Help with gamepassservice?

Asked by
FiredDusk 1466 Moderation Voter
7 years ago

I have the gamepass but when I touch a part, it does not tp me to the other part.

local GamePassService = game:GetService("GamePassService")
local GamePassID = 444803445


script.Parent.Touched:connect(function(hit)
    local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
    if GamePassService:PlayerHasPass(Player, GamePassID) then
        local Character = hit.Parent
        Character:MoveTo(script.Parent.Parent.GPTp)
    end
end)

Answer this question