local id = 18411129
parent = script.Parent
player = game.Players.LocalPlayer
AnotherBrick = game.Workspace.winners
parent.Touched:connect(function(part) -- 3
if part.Parent.Humanoid then -- *
if part.Parent.Humanoid.Health > 0 then -- 4
if game:GetService("GamePassService"):PlayerHasPass(player, id) then
part.Parent:MoveTo(AnotherBrick.Position) -- 5
print("success!")
else
player:PromptGamePassPurchase(player, id)
end
end
end
end)
COMMUNITY QUESTION
It is not moving player to position if they have gamepass?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Why are you using the Legacy version of checking if a player owns a gamepass? UserOwnsGamepassAsync it the current method, and should be used instead of PlayerHasPass. https://developer.roblox.com/en-us/api-reference/function/MarketplaceService/UserOwnsGamePassAsync
That means you should use MarketplaceService instead of GamePassService