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

How can I make this Owner Only Door Function work?

Asked by 9 years ago

I am using Berezaa's Tycoon Kit and I am trying to make a Owner Only Door. I was wondering if I could just make it to where when they take the tycoon the Become Owner Door automatically the Owner Only door for no cost. If would be heavily appreciated if you could help because I cant seem to get a Owner Only Door to work! Become Owner script:

script.Parent.Head.Touched:connect(function(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    if player ~= nil then
        local cashmoney = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name)
        if cashmoney ~= nil then
            local ownstycoon = cashmoney:FindFirstChild("OwnsTycoon")
            if ownstycoon ~= nil then
                if ownstycoon.Value == false then
                    if script.Parent.Parent.Parent.Owner.Value == nil then
                        if hit.Parent:FindFirstChild("Humanoid") then
                            if hit.Parent.Humanoid.Health > 0 then
                                script.Parent.Parent.Parent.Owner.Value = player
                                ownstycoon.Value = true
                                script.Parent.Name = player.Name.."'s Tycoon"
                                script.Parent.Head.Transparency = 0.6
                                script.Parent.Head.CanCollide = false
                                player.TeamColor = BrickColor.new(script.Parent.Parent.Parent.Name)
                            end
                        end
                    end
                end
            end
        end
    end
end)

Please help if you can find the time to!

0
You can just try to get another tycoon kit and take the owner door from there and make some changed to berezaa's kit. Operation_Meme 890 — 9y

Answer this question