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

I made a 2 Player war tyccon the Become a Builder or Fighter thing Dosent work?

Asked by 8 years ago
local ting = 0
owner = script.Parent.Parent.Parent.OwnerName

function onTouched(hit)
    if ting == 0 then
    ting = 1 
    local check = hit.Parent:FindFirstChild("Humanoid")
        if check ~= nil then 
            local thisplr = game.Players:findFirstChild(hit.Parent.Name)
            if (thisplr~=nil) then
                local ownstyc = thisplr:findFirstChild("Tycoon")
                if (ownstyc~=nil) then
                    if ownstyc.Value == 0 then
                        ownstyc.Value = 1
                        owner.Value = thisplr.Name
                        thisplr.TeamColor = BrickColor.new(script.Parent.Parent.Parent.Parent.Col.Value)

                        local message = Instance.new("Message")
                        message.Text = "You Now own a Tycoon"
                        message.Parent = thisplr.PlayerGui
                        wait(3)
                        message:remove()
                        script.Parent.Parent:remove()
                    elseif ownstyc.Value == 1 then
                        local message = Instance.new("Message")
                        message.Text = "You Already own a Tycoon"
                        message.Parent = thisplr.PlayerGui
                        wait(3)
                        message:remove()
                    end
                end
            end
        end
    ting = 0
    end
end

script.Parent.Touched:connect(onTouched) 

There are 2 of these on the Tycoon, its 2 player, Is there somthing wrong with this script? its not working in General, The Block dosent become Transparent in General so you cant walk in.... any help?????

1
Well it's saying that ownstyc is most likely nil. Do you have a thing inside of that player named 'Tycoon'? ikiled 75 — 8y
0
no, i donot think so, how do i check? varunverma 15 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

I don't think it's the script, It's the same with the other tycoon kits, You have to test in a public game not on Test Solo.

Ad

Answer this question