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
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
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.
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
ok i'll provide a different script that shouldn't have that problem
ok
did you get it yet?
Does the new script work?
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
my gamepass: https://web.roblox.com/game-pass/5266510/Vip
PlayerOwnsAsset ( Instance player , int64 assetId )
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.
could you please maybe make the script for me? its ok if you say no