Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a tycoon Owner Only Door?

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.

function onTouched(hit)
        local owner = script.Parent.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
                end
            end
        end
        script.Parent.Touched:connect(onTouched)

2 comments

0

Btw, it doesn't make CanCollide = false. It just stays true.

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.

1 answer

✓ Accepted answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.