Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How do you make a owner only door?

Asked by 11 years ago

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.

1 answer

Log in to vote
0
Answered by
Hybric 271 Moderation Voter
11 years ago
01function g(p)
02local hum = p.Parent:findFirstChild("Humanoid")
03if (hum ~= nil) then
04if game.Players:findFirstChild(hum.Parent.Name).Name == "danielsarabia11" then
05script.Parent.CanCollide = false
06script.Parent.Transparency = 0.5
07wait(0.5)
08script.Parent.CanCollide = true
09script.Parent.Transparency = 0
10else
11hum:TakeDamage(100) -- IF YOU PLAYER TO DIE IF IT IS NOT YOU, IF YOU DONT WANT IT THEN DELETE THIS LINE AND THE "else"
12end
13end
14end
15 
16script.Parent.Touched:connect(g)

** SCRIPT MUST BE INSIDE PART**

Ad

Answer this question