-
What do you want to achieve?
I wan’t for the character to be able to run into any surface without any physical change, except for the character stopping. You know what I mean, no flinging basically. -
What is the issue?
The issue is that when I run into a wall, due to the high speed I tend to get flung or fall over.
Here is a link to the video of what I mean:
Watch The Flash - Roblox Studio 2024-12-12 01-20-10 | Streamable -
What solutions have you tried so far?
Did you look for solutions on the Developer Hub?
I’ve looked on google, dev hub, even chatgpt for help. Yet, I can’t find anything. Any help would be appreciated, thanks
1 Like
Try checking the velocity of the character, and if too high, then make it 0. Here is an example script, and you can change magnitude
to whatever you need
local hum = char:WaitForChild("Humanoid")
local rootpart = char:FindFirstChild("HumanoidRootPart")
if rootpart then
if rootpart.RotVelocity.magnitude >= magnitude or rootpart.Velocity.magnitude >= magnitude then
rootpart.RotVelocity = Vector3.new(0,0,0)
rootpart.Velocity = Vector3.new(0,0,0)
end
else
print("not found")
end
and use renderstepped or some while true do function to continually check for this.