Humanoid.Touched.Health = (Function(Hit) = 0 if
HUmanoid.MarketPlaceService.Gamepass (id) if
GamePassOwned.Humanoid.Health = 100 if
GamepassnotOwned.humanoid.Health = 0 If
GamepassOwned.CanCollide = false
GamepassNotOwned.Cancollide = true
COMMUNITY QUESTION
Could anyone see whats wrong with my vip gamepass door?
1 answer
Try this code
local vipDoor = game.Workspace:FindFirstChild("VipDoor")
local MarketPlaceService = game:GetService("MarketplaceService")
local id = 0000000 -- Put your VIP gamepass id here
game:GetService("Players").PlayerAdded:Connect(function(player)
if MarketPlaceService:UserOwnsGamePassAsync(player, id) then
vipDoor.Transparency = 0.75
vipDoor.CanCollide = false
else
vipDoor.Transparency = 0
vipDoor.CanCollide = true
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
12:07:07.912 Unable to cast Instance to int64 it gives me this error
You gotta set the local id to your VIP gamepass id