|
Ok. I know how painfully slow this subforum goes by, But i was wondering if anybody could tell me how? |
|
|
Whoops i meant gamepass doors |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AntiFiterJoin Date: 2009-05-14 Post Count: 12290 |
i don't know the api for gamepasses but
script.Parent.Touched:connect(function(Player)
if Player.Parent:FindFirstChild("Humanoid") then
if Player:PlayerHasBadge() then -- Idk the api
--stuff
end
end
end)
|
|
Green_KidJoin Date: 2012-07-08 Post Count: 389 |
never heard of a gamepass door you might as well just make a t shirt |
|
|
local ID = 12345 --The ID of your gamepass
script.Parent.Touched:connect(function(Hit) -- As something touches the part
local Player = game.Players:GetPlayerFromCharacter(Hit.Parent) -- Check if what touched the part is a player
if Player then
if game:GetService("GamePassService"):PlayerHasPass(Player, ID) then -- If the players own the gamepass
print(Player.Name.." has the game pass")
end end end) |
|
|
1. STOP SPAMMING! YOU WILL NOT GET A RESPONSE IN 1 MINUTE!
2. You need to get the GamePassService. Here's a script
SERVERSCRIPT:
function HasPass(plr, id)
return game.GamePassService:PlayerHasPass(plr, id)
end
if HasPass(Player, 123456) then
--code here
end
I am assuming you have a variable for the player called "Player" |
|