i cant seem to figure out why my tycoon gate script isn't working? its most likely one of the things you over think but i cant see any errors
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 local message = Instance.new("Message") message.Text = "You now own a Tycoon!" message.Parent = thisplr 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 wait(3) message:remove() end end end end end end script.Parent.Touched:connect(onTouched)
":remove()" is wrong. It needs to be ":Destroy()"
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 local message = Instance.new("Message") message.Text = "You now own a Tycoon!" message.Parent = thisplr wait(3) message:Destroy() script.Parent.Parent:Destroy() elseif ownstyc.Value == 1 then local message = Instance.new("Message") message.Text = "You already own a Tycoon" message.Parent = thisplr wait(3) message:Destroy() end end end end end end script.Parent.Touched:connect(onTouched)