How to prevent character from spinning out after crashing into a wall with BodyVelocity?

The anchor tool and dolphin parts have their CanCollide = false

Can u show da script? (character limit)

            hum.AutoRotate = false
			hum.HipHeight = 3
			getONT:Play(0)
			getDONT:Play(0)
			wait(0.1)
			soundPlay:Play()
			local dash = Instance.new("BodyVelocity",humRP)
			dash.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
			dash.Velocity = humRP.CFrame.LookVector * 90
			game.Debris:AddItem(dash,.2)
			hum.HipHeight = 0
			wait(0.3)
			getOFFT:Play(0)
			getDOFFT:Play(0)

			local dashback = Instance.new("BodyVelocity",humRP)
			dashback.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
			dashback.Velocity = humRP.CFrame.LookVector * -15
			game.Debris:AddItem(dashback,.23)
			wait(0.2)
			weld:Destroy()
			dolphinCloneFolder:Destroy()
			hum.AutoRotate = true

not the whole script, but u should get a gist of what it does

1 Like

Sorry I took so long to respond I couldn’t wrap my head around the script (am not good scripter)
Try anchoring the character quickly when they touch something then moving them back and unanchoring them so that they don’t go through it

You could try using Humanoid.StateChanged() to detect when the character falls over and use Humanoid:ChangeState() to change the state back to to Enum.HumanoidStateType.GettingUp or something

1 Like

issue has been solved by a friend

1 Like

How did you end up solving it?

How? For real, tell us dude… Don’t just mark a resolution without informing others what the resolution was.

1 Like

Dear wanderer,

Ah it has been a short while, and I too have no idea how this was solved by my friend.
However, I do believe that it had something to do with the MaxForce property of the BodyVelocity instance!

image

When I lowered the value of Force, the character tends to spin out less (As shown in the gif of me hitting my head on the wall!)

RobloxStudioBeta_fm9GEjCat1

In conclusion, I apologize for the lack of skill I have in scripting. I did not mean to be selfish because I honestly thought that others have found the solution after tinkering around a bit. :wink: