How do you make a owner only door and a game pass door combined as one. I am having trouble with this as I am building a fort.
01 | function g(p) |
02 | local hum = p.Parent:findFirstChild( "Humanoid" ) |
03 | if (hum ~ = nil ) then |
04 | if game.Players:findFirstChild(hum.Parent.Name).Name = = "danielsarabia11" then |
05 | script.Parent.CanCollide = false |
06 | script.Parent.Transparency = 0.5 |
07 | wait( 0.5 ) |
08 | script.Parent.CanCollide = true |
09 | script.Parent.Transparency = 0 |
10 | else |
11 | hum:TakeDamage( 100 ) -- IF YOU PLAYER TO DIE IF IT IS NOT YOU, IF YOU DONT WANT IT THEN DELETE THIS LINE AND THE "else" |
12 | end |
13 | end |
14 | end |
15 |
16 | script.Parent.Touched:connect(g) |
** SCRIPT MUST BE INSIDE PART**