Script not working

Hello developers,
I am trying to make when proximity prompt triggered the parent of proximity prompt(NPC) destroy and player money will increase. But there is a problem that I don’t know how to solve. The script did not run at all furthermore there was no error in the output. It will be a great help if anyone could help me solve this problem.this is my code:

local charclone = game.Workspace.CharacterClone

for I , v in pairs(charclone:GetChildren())do
	v.HumanoidRootPart.ProximityPrompt.Triggered:Connect(function(player)
		v:Destroy()
		player.leaderstats.Money.Value = player.leaderstats.Money.Value + 15
		game.ReplicatedStorage.Remotes.IceCreamJobEvent:FireClient(player)
		print("beep boop")
	end)
end

why are you putting an event in a for loop? It would probably be better to do this

local charclone = workspace.CharacterClone

charclone.HumanoidRootPart.ProximityPrompt.Triggered:Connect(function(player)
    for I , v in pairs(charclone:GetChildren())do
		v:Destroy()
		player.leaderstats.Money.Value = player.leaderstats.Money.Value + 15
		game.ReplicatedStorage.Remotes.IceCreamJobEvent:FireClient(player)
		print("beep boop")
	end)
end
local charclone = workspace.CharacterClone

It’s a folder actually.

charclone.HumanoidRootPart.ProximityPrompt.Triggered:Connect(function(player)

Is it possible something like this

As long as it’s referencing the proximityprompt then yes

But it gives an error that says

 HumanoidRootPart is not a valid member of Folder "Workspace.CharacterClone"  -  Server - NPCbuildingIn interract:3

You need to get where the humanoidrootpart is, in the model

if I do something like this

charclone:WaitForChild(" ").HumanoidRootPart.ProximityPrompt.Triggered:Connect(function(player)

will it return nil??

Nvm it’s working…thanks
((((())))