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

Teleporter script has an error?

I have 2 teleporters. I just need 1, because they are basically the same thing:

script.Parent.Touched:connect(function(tch)
	local trs = tch.Parent:FindFirstChild("Torso")
	local lrm =  tch.Parent:FindFirstChild("Left Arm")
	local rrm =  tch.Parent:FindFirstChild("Right Arm")
	local lg =  tch.Parent:FindFirstChild("Left Leg")
	local rg =  tch.Parent:FindFirstChild("Right Leg")
	local hd =  tch.Parent:FindFirstChild("Head")
	if trs ~= nil and lrm ~= nil and rrm ~= nil and lg ~= nil and rg ~= nil and hd ~= nil then
		
		trs.Position = script.Parent.Parent.TP2.Position
		lrm.Position = script.Parent.Parent.TP2.Position
		rrm.Position = script.Parent.Parent.TP2.Position
		lg.Position = script.Parent.Parent.TP2.Position
		rg.Position = script.Parent.Parent.TP2.Position
		hd.Position = script.Parent.Parent.TP2.Position
	end
end)

The problem is that I think the joints disconnect when repositioned and makes the player die.

Is there a good method to make sure the joints don't disconnect and teleport?

1 answer

✓ Accepted answer

Have you tried using playerModel:MoveTo(position) yet?

2 comments

0

Not really, because this is my original script. But I can't believe I didn't use that method instead of the one I did.

0

Thanks for your answer! I accepted your answer.

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