How to stop player from flinging?

When rotating your mouse, the hockey stick pushes off the goal and flings your player. (See below for gif). What’s the best way to go about stopping this. I thought about collision groups but then your hockey stick would go through the goal.
Thanks!

https://gyazo.com/15f5f3d37fa0b12f3418e257ebd0aed1

This occurs when rotating your mouse on any anchored or high density part.

5 Likes

I think making the collision false for the stick when it touches that would fix it, and then making the can collide to true when it doesn’t touch the net

If anyone is looking for the solution

local function FlingPreventionUpdate()
if CurrentHum ~= nil and CurrentRoot ~= nil and Force ~= nil then
if CurrentRoot:IsDescendantOf(Workspace) then
if CurrentRoot.RotVelocity.magnitude >= 50 or CurrentRoot.Velocity.magnitude >= 50 then
CurrentRoot.RotVelocity = Vector3.new()
CurrentRoot.Velocity = Vector3.new()
print(“Fling prevented”)
end
end
end
end

Credit to Loleris

3 Likes