So i was making a teleporter for my tycoon game, and i made a teleporter but the output shows the error "attempt to index nil with 'Touched' " even tho im doing it in a part, ill put the code
local Sender = script.Parent local Reciever = Sender.Parent:WaitForChild("Reciver") Sender.Touched:Connect(function(hit) if hit.Name == "Ore" then hit.Position = Reciever.Position end end)
i dont find an error on that code, the script is parented to a part so i dont know why the error happens,.