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

Tycoon script not working No error Help?

Asked by 8 years ago
function onTouch(hit)
    local name = hit.Parent.Name
    local plr = hit.Parent:FindFirstChild("Humanoid")
     if plr then
    local check1 = game.Players:GetPlayerFromCharacter(hit.Parent)
      if check1 then
        local check2 = check1:WaitForChild("leaderstats")
          if check2 then
            local check3 = check2:WaitForChild("Owner")
            if check3 == true then
                local m = Instance.new("Message",game.Workspace)
                m.Text = "Player"..name
                wait(7)
                m:Destroy()
                end
              if check3 then
                  check3.Value = true
                end
            end
        end
    end
end
script.Parent.Touched:connect(onTouch)
wait(1)

I want it to display a message if that person already owns a tycoon please help?

1 answer

Log in to vote
0
Answered by 8 years ago

I figured it out it was that check3 was not its value so check3.Value is the proper thing

Ad

Answer this question