When you take the mask, which is the game tool, the piece should detect this and teleport. I don’t understand where is the mistake in the code? full code:
local mask = game:GetService(“StarterPack”):WaitForChild(“mask”)
local function teleportNightmarePuppet()
print(“Teleporting nightmarepuppet”)
local nightmarePuppet = workspace:WaitForChild(“nightmarepuppet”)
nightmarePuppet.Position = Vector3.new(-96, 0.5, 92)
end
mask.Touched:Connect(function(hit)
local character = hit.Parent
if character:IsA(“nightmarepuppet”) and character:FindFirstChild(“Humanoid”) then
teleportNightmarePuppet()
end
end)