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

How can I make my Owner Only Door work?

Asked by 9 years ago

So I am using Berezaa's Tycoon Kit and I am trying to make a Owner Only Door but there is a small problem. Most Tycoon use a Value named OwnerName but Berezaa uses just Owner. When I use my edited script it does absolutely nothing! My script:

function onTouched(hit)
local owner = script.Parent.Parent.Owner
local h = hit.Parent:findFirstChild("Humanoid")
    if (h ~= nil) then
        if h.Parent.Name == owner.Value then
            script.Parent.CanCollide = false
            wait(2)
            script.Parent.CanCollide = true
            else h.Health = 0
        end
    end
end
script.Parent.Touched:connect(onTouched)

If you can help me modify this script please do so! THANKS!

-TixyScripter-

0
What does the output say when you try to run the script? IcyArticunoX 355 — 9y
0
Let me check alright TixyScripter 115 — 9y
0
Its says this: TixyScripter 115 — 9y

Answer this question