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

How do I make a tycoon Owner Only Door?

Asked by 8 years ago

I'm trying to make a tycoon owner only door with Berezaa's tycoon kit. This is what I have and I don't want it to kill :/ If anyone can help, then thanks.

01function onTouched(hit)
02        local owner = script.Parent.Parent.Parent.Owner
03        local h = hit.Parent:findFirstChild("Humanoid")
04            if (h ~= nil) then
05                if h.Parent.Name == owner.Value then
06                    script.Parent.CanCollide = false
07                    wait(2)
08                    script.Parent.CanCollide = true
09                end
10            end
11        end
12        script.Parent.Touched:connect(onTouched)
0
Btw, it doesn't make CanCollide = false. It just stays true. qualitygamesdotinc 0 — 8y
0
The problem doesn't look to be in this particular code. The door probably doesn't have the correct name, as in line 6 and 8, or you are trying to access the wrong item at 2 and 5. SquirreIOnToast 309 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

Probably the best way is to go to models and search for "Zednov's Tycoon Kit." (or another) and find his door and copy and paste his script for his door on to your script...and make sure to modify it to fit your titles....im new or i would be able to help more.

Ad

Answer this question