Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make this item pass to other players by touch?

Asked by 2 years ago
Edited 2 years ago
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?

0
pls me more clear and send images i dont understand a thing sne_123456 439 — 2y
0
My original post was not well worded. I have edited it to make it more clear what the problem is. I hope this helps. EvilWray 2 — 2y
0
You're trying to make a touched event on... A humanoid..? Did you mean HumanoidRootPart? NotThatFamouss 605 — 2y

Answer this question