function task.start(f,h) end function task.finish(f,h) end function task.run(f,h)local j=h.Model.HostileType.Value local H=game.ServerScriptService.Source.HostileNPCs.NPCs.HostileTypes:FindFirstChild(j)if H then local f=H[Node].Value local j=TreeCreator:Create(h,f..Node)j:run()end f:success()return end return task
-- Any arguments passed into Tree:run() can be received after the first parameter, obj
-- Example: Tree:run(deltaTime) - > task:start(obj,deltaTime)

function task:start(obj)
	--[[
		(optional) this function is called directly before the run method
  		is called. It allows you to setup things before starting to run
  		Beware: if task is resumed after calling running(), start is not called.
	--]]
end
function task:finish(obj)
	--[[
		(optional) this function is called directly after the run method
		is completed with either success() or fail(). It allows you to clean up
		things, after you run the task.
	--]]
end
function task:run(obj)
	--[[
		This is the meat of your task. The run method does everything you want it to do.
			
  	 	Finish it with one of these method calls:
  		success() - The task did run successfully
  		fail()    - The task did fail
  		running() - The task is still running and will be called directly from parent node
	--]]
	--obj:print("Run Enemy Sequence")
	local Type = obj.Model.HostileType.Value
	local TypeFolder = game.ServerScriptService.Source.HostileNPCs.NPCs.HostileTypes:FindFirstChild(Type)
	if TypeFolder then
		local treeType = TypeFolder[Node].Value
		local tree = TreeCreator:Create(obj, treeType .. Node)
		tree:run()
	end

	self:success()
	return
end
return task
