How to stop the player from flinging when falling from high height?

The part the player teleports to has no scripts, it is an entire different part. There are two parts in the script, the part that teleports the player, and then part that the player teleports to.

In both videos you sent, it appears that the player is being teleported to the exact same part. Unless you have an exact duplicate of both areas, it’s teleporting to the same part.

If those videos are inaccurate, please record new videos (and preferably use the .mp4 format so that they embed).

I’m not sure how I would make it a mp4. If I try renaming it it’s still the same.

In the View tab of your file explorer, make sure you have “File name extensions” enabled, then you can change the .wmv to .mp4.

This popped up when I went to do it:
Screenshot (1105)

I made a copy I did it anyways:


Seems like it didn’t work.

That’s usually fine, although it seems that it can’t convert it in a way that the forums understands, even if it’s playable on Windows… But VLC should be able to fix that if you’re converting it. Otherwise, I would recommend using something like Gyazo.


Although it seems that either I’ve done something wrong or VLC just isn’t working right. I don’t use VLC for this normally. But in the original files, it shows what I was referring to about teleporting to the same part.

I don’t know what any of that stuff is.

Here is the video anyways:
Test.wmv (5.7 MB)

Gyazo allows you to record gifs/videos for free (although with some time limit restrictions, unless you buy premium or do some “editing”). If you do use that, you should also share links with .mp4 or .gif at the end so that it properly embeds (optionally, you can download them as well if you don’t want to rely on their link).

But as I was saying:

And also:

This is showing what I meant. You’re teleporting to the same part over and over, causing it to trigger on itself.

I’ll just explain it with pictures.
RobloxScreenShot20230227_111252377

I understand what you’re wanting to do, but your videos are showing the character getting teleported to the same teleport part continuously. The code you sent earlier looks correct, so there must be some other script causing that to happen.

My internet kinda went down or something like that. I kept getting error 504 so I couldn’t respond. I copied what I tried to say before so here is what I said:
I found out that the script will teleport the player to the top of a part if they are inside it if the part has CanCollide off. I moved the parts the player teleports to up 20, changed the scripts to teleport they player down 20 more than what it was before, and I added a small part that changes the speed of the player. The only problem now really is that the jump looks a bit weird but it’s fine.

Also that wouldn’t be a problem with the script that teleports the player, it’s a problem with the script that stops the player from flinging because when I go out of the part it stops and when I go into the part and jump it starts. During that time I am no longer touching the part that teleports me in the first place. I found it was an issue with CanCollide. I just need to find a way around that for everything that I do with that game.

I think you need to get rid of your anti-fling script most likely. But anyway, I’m glad you were able to find the issue. Please also select one of the responses as the solution for the original topic, that way if somebody searches up a similar topic, they’ll see this as an asked-and-answered solution.

Preferably post #8 if you pick one of mine (otherwise pick whichever you want).

That was for everyone, but it seems to be fixed now.

I was wondering what was going on. I thought something happened on my side only. Also I disabled the script and nothing happened when I did other than a slightly less now noticeable teleport when the player jumps. I’m probably going to make a reply that explains the solution.

If anybody experiences the same issue as me here is the solution:
Under StarterPlayer there is StarterCharacterScripts. Put a local script under StarterCharacterScripts.
In that script put the code below. It will stop the player from flinging, however the only downside is that when the player jump it looks a bit weird. Also if the player jumps within a part that has CanCollide set to false then the player will be teleported to the top of the part in a loop every second or two. To get around that in a situation where you teleport the player move the part up maybe 20 studs and then teleport the player the 20 studs plus however many studs that won’t teleport the player somewhere midair.
Here is the script:

local character = script.Parent --character, can grab from CharacterAdded signal / or placing script under character in StarterCharacter
local humanoid = character:WaitForChild("Humanoid")
local primaryPart = character:WaitForChild("HumanoidRootPart")

humanoid.StateChanged:Connect(function(oldState, newState)
	if newState == Enum.HumanoidStateType.Landed then
		-- cancel out existing velocity
		local velo = primaryPart.AssemblyLinearVelocity
		primaryPart.AssemblyLinearVelocity = velo*Vector3.new(1,0,1)

		-- get distance to ground
		local ray = Ray.new(primaryPart.Position, Vector3.new(0,-20,0))
		local hit, pos = game.Workspace:FindPartOnRay(ray, character)

		--apply ground hit position to character at hip height offset
		local hipHeight = humanoid.HipHeight
		local newPos = pos + Vector3.new(0,hipHeight,0)
		character:MoveTo(primaryPart.Position - primaryPart.Position + newPos) -- changed to moveTo and instead of primaryPart.CFrame used primaryPart.Position
	end
end)

The player does have the potential to glitch into walls which causes the script to trigger and teleport the player to the top of the wall so you might want to add something to prevent that.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.