Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What do I need to change to teleport from 1 part to another?

--TheBoySurvivor

script.Parent.Touched:Connect(function(t)

if t.parent and t.parent:FindFirstChild("torso") then

t.Parent:MoveTo(workspace.B.Position)

end

end)

1 comment

0

You have "torso" used with improper grammar. Coding languages are case sensitive. Change "torso" to "Torso" and you should should be golden.

1 answer

✓ Accepted answer

Lua is case sensitive

Use connect, not Connect, use .Parent, not .parent, and look for Torso, not torso.

script.Parent.Touched:connect(function(t)
	if t.Parent:FindFirstChild("Torso") then
		t.Parent:MoveTo(workspace.B.Position)
	end
end)

Good Luck

If I helped, please don't forget to accept my answer.

1 comment

1

Just like C++ is semicolon sensitive,I always spend hours trying to find that ONE uncapitalized letter.

This discussion is preserved as it was. New answers, comments, and votes are closed.