Script:
1 | local id = 6867225 |
2 | local mps = game:GetService( "MarketplaceService" ) |
3 |
4 | script.Parent.ClickDetector.MouseClick:Connect( function (p) |
5 | if mps:UserOwnsGamePassAsync(p.UserId, id) then |
6 | local char = p:WaitForChild( "Character" ) or p.CharacterAdded |
7 | char.HumanoidRootPart.CFrame = CFrame.new( 0 , 50 , 0 ) |
8 | end |
9 | end ) |
Character
is not a child of player, try p.Character
instead of p:WaitForChild("Character")
.