Void Spawning - Continuation

I posted a few days ago asking for people to help with my void spawning issue… (People randomly spawn into the void) I didn’t get a resolution unfortunately. Here is the link to the original thread:

After sitting and purposely decoding all my scripts, I’ve managed to narrow my issue down to this piece as listed below. I’m certain something in that piece of code makes people spawn in the void randomly.

Hopefully we can resolve the issue. :slight_smile:

	player.CharacterAdded:Connect(function(char)
		local hum = char:WaitForChild("Humanoid")
		wait(1)
		char:MoveTo(Nodes[node.Value].Position)
		hum.Touched:Connect(function(hit)
			if hit.Parent == Nodes then
				if tonumber(hit.Name) == node.Value + 1 then
					node.Value = node.Value + 1
				end
			end
		end)
	end)
end)


1 Like

Its possible that a player’s character is clipping inside a part near the position you are moving it to and being shifted into the void.

To stop this clipping use `PivotTo()’ on the player’s character. For example:

char:PivotTo(Nodes[node.Value].CFrame)

OR

Nodes[node.Value] is returning a part within the void.

I will update the “PivotTo” now, and will let you know if I notice a difference. It’s funny you mention about clipping.

  1. My character does spawn laying down sometimes, but that is very rare.

  2. I also fall through the spawn points the wrong way, but again. It’s very rare.

How do you mean about part returning into the void?

I mean like if the part you are getting from Nodes[node.Value] is in the void. Either from you getting the wrong part or the part is unachored and falls into the void.

1 Like

I updated to PivotTo, but now I spawn under my checkpoints. Hahaha

The issue is definitely from clipping then. Try moving the character above the checkpoint (which I’m assuming is on the ground).

char:PivotTo(Nodes[node.Value].CFrame * CFrame.new(0, 5, 0))
1 Like

I’m writing this on my phone so I have no idea if this will work but you could try:

local charSize = char:GetExtentsSize()
char:PivotTo(Nodes[node.Value].CFrame * CFrame.new(0, charSize.Y/2, 0))

That should spawn it above the checkpoint based on the size of the character.

1 Like

I will try the CFrame (0,5,0)) first and see if I can break it lol, I will get back to you in a short while…

Edit: I updated it and so far so good. :slight_smile:

Thank you, this solution seems to have worked, (I’ve just been and played my obby twice in a row with no void spawns. I’ve never been able to complete it once without it doing it at least once.) So thank you.

Edit, It’s taken me shy of two weeks to figure this out…

I did have to tweak it a little to CFrame * CFrame.new (0,15,0)) to fully eliminate void spawning. CFrame * CFrame.new (0,5,0)) wasn’t quite enough, but that’s probably because I have thick checkpoint blocks.

Thanks :slight_smile:

1 Like

Are your checkpoint blocks in the ground? I think with a little bit of math you could move the player directly on top of the checkpoint:

local charSize = char:GetExtentsSize()
local checkpoint = Nodes[node.Value]

char:PivotTo(checkpoint.CFrame * CFrame.new(0, checkpoint.Size.Y/2 + charSize.Y/2, 0))

No, my obby is in space, everything is anchored in the air.

I mean like, inside the platform you are trying to spawn the character on.

This is how the checkpoints look.

This is their size
12, 2, 12.002

I see, that makes so much more sense now. Your issue before was because you were moving the player into the center of the checkpoint. So the player forced into the center of the part and would randomly choose to push itself out the top or bottom to get out.

Checkpoints weren’t always that thick though, I only updated that a couple of days ago.