Random teleporting to another place

Hello there, I’m Eco! I have recently release a game called ‘Winter Night [STORY]’ which a christmas based story game.

Now there’s this 1 problem with the game, sometimes when you’re playing the game randomly in between you’re just teleported back to the lobby from the story place.

There are 2 places, main one is “Winter Night STORY” and other one is “On Christmas Eve”
Players are supposed to sit in the bus and teleport to ‘On Christmas Eve’ place and finish the game there and then they’ll be teleported back to the main place automatically.

The thing is that sometimes a random players will be kicked back to the lobby for no reason! This happens to only a few people who are playing but however there is a higher chance that it doesn’t happen most of the time.

I’ve checked all my scripts and there’s nothing which just randomly kicks or suddenly teleports the player back to the lobby, do you have any idea why it’s happening? There are just a few TeleportService scripts which will only work on specific parts such as clicking “Go back to Lobby” button or after the game has ended.

Many people are complaining and reporting me about this bug, any help as soon as possible will be really appreciated, thank you!

1 Like

Could it be something to do with the death screen? I’m just saying since that’s the only thing that could cause it. Try disabling all the teleporting scripts to test it and enable one by one to see which is causing it.

The death screen script is only enabled once the player has died otherwise it’s disabled and does not cause any errors.

1 Like

Try to make it print in all of your scripts that teleport.

1 Like

The thing is that it never happened or me or to someone who I know. It’s just random fans who are reporting about it and it just happens at any part randomly so I can’t tell when I’m about to be teleported.

Click on Ctrl + Shift + F search for Player.Character.HumanoidRootPart.CFrame if you give yourself variables search for them. Because a script moves the primarypart

1 Like

I just checked and I don’t have anything related to Character.HumanoidRootPart.CFrame other than just changing it’s position to move the players in-game

Well you are changing the position so check that code out

They are teleporting between places, not moving a character.

1 Like
function TeleportPlayers(position, maxOffset)
	for i, v in pairs(game.Players:GetChildren()) do
		if v.Character:FindFirstChild("HumanoidRootPart") then
			v.Character.Humanoid.Sit = false
			wait(0.15)
			v.Character:SetPrimaryPartCFrame(CFrame.new(position + Vector3.new(math.random(-maxOffset, maxOffset), 0, math.random(-maxOffset, maxOffset))))
		end
	end
end

This is the code for changing HumanoidRootPart’s CFrame for the players and it will only move the character in a single place.

They are teleporting between places, not moving a character.

I’m having troubles in teleportations with 2 different places just like Mixu said

May I see the teleporting script? The one that teleports you back to

I coincidentally saw this thread, maybe it’s related.
No disconnect message in universe games - Platform Feedback / Engine Bugs - Roblox Developer Forum

1 Like