-- / Functions / --

ShootModule.ActivateModule = function(StartPosition, HitPosition, EnemyHumanoid, Damage)
	local BulletNode = Instance.new("Part")
	BulletNode.Transparency = 1
	BulletNode.CanCollide = false
	BulletNode.Anchored = true
	BulletNode.CanTouch = false
	BulletNode.CanQuery = false
	
	local StartNode = BulletNode:Clone()
	StartNode.Parent = game.Workspace
	StartNode.Position = StartPosition
	
	local EndNode = BulletNode:Clone()
	EndNode.Parent = game.Workspace
	EndNode.Position = HitPosition

	local A0 =  Instance.new("Attachment")
	A0.Parent = StartNode
	
	local A1 = Instance.new("Attachment")
	A1.Parent = EndNode

	local BulletTrail = GunAssets:WaitForChild("BulletTrail"):Clone()
	BulletTrail.Parent = Gun
	BulletTrail.Attachment0 = A0
	BulletTrail.Attachment1 = A1

	Debris:AddItem(StartNode, 0.1)
	Debris:AddItem(EndNode, 0.1)

	Debris:AddItem(A0, 0.1)
	Debris:AddItem(A1, 0.1)

	Debris:AddItem(BulletTrail, 0.1)
	
	if EnemyHumanoid then
		EnemyHumanoid:TakeDamage(Damage)
		
	end
end
