Player Based clone not working

Hello!
I was making a chunk system when I ran into this issue. Also, I want to know what the best way to loop the mouse.Target, Please Help!

local

local plr = game:GetService("Players").LocalPlayer
local mouse = plr:GetMouse()
local Target = mouse.Target
for i, v in pairs(workspace.Chunks:GetChildren()) do
	if v.Name == "Chunk" or v.Name == "OceanChunk" then
		while true do
			if Target == v.Top or Target == v.Base then
				print("S")
				game.ReplicatedStorage.SelectChunk:Clone().Parent = v.Top
			else
				if v.Top:FindFirstChild("SelectChunk") then
					print("s")
					v.Top.SelectChunk:Destroy()
				end
			end
			wait()
		end
	end
end

What is the issue? Your question is not formed very well.

The Target is not working in the script.

Move

Target = mouse.Target

under

while true do

ok, I will try to see if that works.