Advertisement
Jonny_Zuko_onYoutube

how to make a group only door|roblox

Dec 13th, 2019
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. local groupId = 0 -- Insert Group Id Here
  2.  
  3. script.Parent.Touched:connect(function(hit)
  4. local hum = hit.Parent:findFirstChild("Humanoid")
  5. if hum then
  6. local player = game.Players:GetPlayerFromCharacter(hit.Parent)
  7. if player then
  8. if player:IsInGroup(groupId) then
  9. script.Parent.Transparency = 0.8
  10. script.Parent.CanCollide = false
  11. wait(1)
  12. script.Parent.Transparency = 0
  13. script.Parent.CanCollide = true
  14. end
  15. end
  16. end
  17. end)
  18.  
  19. -- if the player has joined the group and has touched the brick, it will let them through. Make sure to copy the id of the group and paste it where the group id = 0 is.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement