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

I got a teleport script but I die when I teleport?

So if i teleport i get under the "island" and i instantly die, how can I fix this

portal.Touched:Connect(debounce(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		local character = hit.Parent
		local player = Players:GetPlayerFromCharacter(character)
		local rebirths = player.leaderstats.Rebirths.Value
		if rebirths >= tonumber(portal.Name) then
			character.HumanoidRootPart.CFrame =  destination.CFrame
		end
	end
end))

1 comment

0

i guess destination is a Part located within Workspace?

1 answer

✓ Accepted answer

The script itself is working.

My guess is that the CFrame you are teleporting to is somewhere out of Bounds where Roblox kills the player (a.e. too far down)

Try using Position and Orientation instead of CFrames if you are unsure.

6 comments

0

Maybe it is beceause my thing is not on the baseplate but further away?

0

if its away sideways it shoul not be a problem normally. but if you fall into the void you are going to die. try putting it above the baseplate

0

i put it above the baseplate, but it doesnt teleport me on it, it teleports me under the baseplate, that is probs the reason that it insta kills me, but I dont know how to fix that

0

move it up from the ground and anchor it? (also maybe enable noCollide)

0

You are teleporting the middle of the body to that part. So do not make it too low

0

Oh I fixed it, I thought I anchored it but ig not, thanks!

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