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

I keep making a vip door with this script, but it wont work! Please help? (Edited)

My script only has 3 lines, and im not getting any error message(s)

local Id =  5266510
game:GetService("MarketplaceService"):PlayerOwnsAsset(Id)
script.Parent.CanCollide = false

My gamepass: https://web.roblox.com/game-pass/5266510/Vip

4 comments

0

PlayerOwnsAsset ( Instance player , int64 assetId )

0

This is not a full script. You need to define which who the player is, you need to set a timer before closing the door again. You may want to consult the wiki on making a VIP door to help you flesh out your script first as at the moment there is a lot missing.

0

could you please maybe make the script for me? its ok if you say no

1 answer

Script in ServerScriptService

game.Players.PlayerAdded:connect(function(player)
		local Id =  5266510 -- gamepass ID
		if game:GetService("MarketplaceService"):PlayerOwnsAsset(player,Id) then -- check if they own it
			workspace.Part.CanCollide = false -- change part to door name
		end
end)

It'd be much better to use collision groups but here is how to make CanCollide on an object false if they own the gamepass.

5 comments

0

zor_os i just tried that but got spammed by this a lot of times 16:50:57.918 - Stack Begin 16:50:57.919 - Script 'Workspace.LobbyVipDoor.Script', Line 5 16:50:57.919 - Stack End 16:50:59.085 - MarketPlaceService::PlayerOwnsAsset failed because number of API requests/minute exceeded limit for HTTP API throttle. Please don't issue more than 400 API requests/minute with server scripts and no more

0

ok i'll provide a different script that shouldn't have that problem

0

ok

0

did you get it yet?

0

Does the new script work?

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