So I have this part that is created with this script
local Player = game.Players.localPlayer
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:wait()
plr.Character:WaitForChild("Torso")
local torso = plr.Character.Torso
local part = Instance.new("Part", game.Workspace)
part.Transparency = 1
part.CanCollide = false
part.Size = Vector3.new(7,7,7)
game.Lighting.Find:Clone().Parent = part
part:FindFirstChild("Find").Disabled = false
part.Anchored = true
while wait(0.025) do
part.CFrame = CFrame.new(torso.Position)
end
end)
and whenever the part touches another part I want it this script (located in the part created above) to fire its function
while wait(0.1) do
script.Parent.Touched:connect(function(hit)
local found = hit:FindFirstChild("ItemName")
if found then
print(found.Parent.Name)
end
end)
end
for some reason it doesn't work and its not the collision either

5 comments
"Why are you referencing localplayer(incorrectly)?" I think that should be a statement rather than a question lol
the 2nd script has the error.... the first script is just the understanding of how the 2nd script works
Overall your code just doesn't make any sense. What are you trying to accomplish here?
It makes perfect since if the part created in the first script touches another part check the touched part for a Object c alled ItemName if that object exists then print the objects parent's name