script.Parent.Parent.Parent.Humanoid.Touched:Connect(function(part) if part.Parent:FindFirstChild("Humanoid") then script.Parent.Parent = part.Parent.Head end end)
script.Parent is the object I am trying to pass from one player's humaniod to another when the first player is touched by another player. The player that touches the original player is then supposed to become the new parent of script.Parent. This function works the first time it is called. However, after that it never works again. I think the problem is that when the function ends script.Parent.Parent.Parent does not update to the new parent and the function continues to refer to the original parent. How do I make the function refer to the new parent instead of the old one?