How to avoid player glitching when flung?

My player gets flung by a wave, this worked fine in R6 but now that I switched to R15 it’s glitchy

(Note: there are very thick invisible walls)

wave hitbox script (ragdoll)

local hitbox = wave.HitPart.Touched:Connect(function(hit)
			local char = hit.Parent
			if char:FindFirstChild("Humanoid") == nil then return end
			local plr = game:GetService("Players"):GetPlayerFromCharacter(char)

			if hitlist[char] == true then return end
			hitlist[char] = true


			-- Tsunami behaviour
			RagdollController.RagdollCharacter(char)

			task.wait()

			char.HumanoidRootPart.AssemblyLinearVelocity = Vector3.new(0, 50, -100) * 1


			task.wait(0.1)

			task.delay(5, function()
				if stophitlist[char] == true then return end	

				if char.HumanoidRootPart.Velocity == Vector3.new(0, 0, 0) then
					stophitlist[char] = true

					RagdollController.UnRagdollCharacter(char)
					PosFixEvent:Fire(char.Name)
				end
			end)

			hitlist[char] = false


		end)

To push the player I use HRP:AssemblyLinearVelocity

I tried lowering the force and adding more cooldown to the hitbox but doing so will make the player not follow the wave.

HELP

1 Like

Why not use a LinearVelocity instead?

3 Likes

i know this doesn’t answer your question, but nice game looks pretty fun

2 Likes

Make when the character touches the invisible walls to make the AssemblyLinearVelocity to 0

2 Likes

Haha thanks mate, I really appreciate that :smiley:

1 Like

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