Player Keeps Falling Through Map After Teleporting

After taking a break from developing, I came back to find my game already hilariously broken. I have a hub area, a loading area that the player is teleported to as the map generates, and the map teleport part that the player teleports to. The part of the map that’s under the teleport part is preloaded so that’s not the issue. When I activate the script that begins the teleport process, it brings the play to the loading area, (which works fine), then when the map is finished generating, it teleport the player to the map teleport part. When I test it however, after the map generates the player falls out the world.

Script:

loadingGUIEvent:FireAllClients("on")
		if generateRoomsDefault("Level0") == true then
			if char.Humanoid then
				char.HumanoidRootPart.CFrame = leveltele[3].CFrame
				task.wait(0.5)
				char.HumanoidRootPart.CFrame = leveltele[3].CFrame
				print("Player Teleported to Level 0!")
				updateChunks.Value = true
				loadingGUIEvent:FireAllClients("off")
			end
		end

Thanks for your time :slight_smile:

1 Like

what if you put updateChunks.Value = true before teleporting?

That value decides wether or not the map is affected by my chunk system, and wouldn’t have an affect as the part of the map around the teleport area is preloaded and not affected.

can a unanchored collidable object go through the map, is the character uncollidable

1 Like

The floor is anchored and the player is collidable. It appears like the player teleports under the map even though the teleport part is well above the ground

If anyone could help me with this that would be amazing, I literally cant develop any further because of this.

Just a shot in the dark but have you used char:MoveTo()?

Either that or check if the part you’re teleporting to’s coordinates aren’t == nil

Are you using StreamingEnabled? If so, it is possible that it isn’t yet loaded hence the player falls. To fix it you can either disable StreamingEnabled, or put small bits of the default Terrain for the player to fall onto as the main map loads, as it seems to load a lot quicker

I’ve tried setting position, CFrame, MoveTo, and PivotTo but non of them have worked. I don’t think the parts CFrame coords are nil because the player is either glitching through the floor below the part or above it but is still in its general location.

I’m not using streaming enabled

Could you send a video of the player teleporting and falling?

I can send one later today

I actually set up a local server and watched over the tp part location when I walk into the teleporter. It appears as tho the player goes straight into the ground and not into the teleport location. The teleport location is above the ground

Send a video of everything about the teleporter and what happens including where the objects are

I honestly don’t know how we could help you right now without a video but yet again another shot in the dark -

try deleting one of the
char.HumanoidRootPart.CFrame = leveltele[3].CFrame
things, I don’t know why there are two

When I print the variables, leveltele[3].CFrame is a CFrame, and char.HumanoidRootPart is a part.

If you’re using Rojo, I’d suggest trying out Rojo Studio: https://github.com/LPGhatguy/rojo-studio
The teleport should work fine without having to wait or anything. You can use Rojo Studio to see if your player is getting the correct CFrame or not.