Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Could anyone see whats wrong with my vip gamepass door?

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

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)

2 comments

0

12:07:07.912 Unable to cast Instance to int64 it gives me this error

0

You gotta set the local id to your VIP gamepass id

This discussion is preserved as it was. New answers, comments, and votes are closed.