Velocity flinging on object touch


I’ve been experiencing this random issue with the velocity thing flinging them far instead of stopping them like a player would if they hit an object while moving, I don’t know if it’s the body velocity only that does this or it’s for unanchored high velocity objects getting ricocheted off heavy/anchored objects

Hi there,

Can you send a part of the/ script to clarify what might be the issue of this?

How do you handle the velocity? It looks like the character is just ploughing forwards, and since the character isn’t hitting a big wall, instead clipping just the edge of the pole - it makes their character spin out whilst continuing forwards and falling over.

I would recommend casting a ray until the ray hits an object and then it would stop the dash action before getting flung.

local wallCheck = workspace:Raycast(root.Position, root.CFrame.LookVector * 5, params) -- zorgt ervoor dat je niet in muur botst
		if wallCheck then
			stopSlide()
		end

This is the script i have in my sliding system

hitting it more directly is what makes the less ricochet effect, and is instead either clipping the player inward or making the player fall down via platform stand

here is my code using your example:

		local wallcheck = workspace:Raycast(root.Position, root.CFrame.LookVector * 5, par)
		local djjd
		djjd = game["Run Service"].Heartbeat:Connect(function()
			wallcheck = workspace:Raycast(root.Position, root.CFrame.LookVector * 5, par)
			humanoid.PlatformStand = false
		end)
		if wallcheck then
			bv:Destroy()
			djjd:Disconnect()
		end

it actually seemed to work with some testing as feedback, i’ll mark this as solution, thanks! :wink:

1 Like

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