Hi, I just wanted to share this simple way to prevent flinging without entirely disabling player collisions.
I hope someone finds this useful.
This is a client sided script.
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
RunService.PreSimulation:Connect(function()
for _, player in Players:GetPlayers() do
if player == Players.LocalPlayer then
continue
end
local character = player.Character
if character == nil then
continue
end
local rootPart = character.PrimaryPart
if rootPart == nil then
continue
end
local angularVelocity = rootPart.AssemblyAngularVelocity
local linearVelocity = rootPart.AssemblyLinearVelocity
if vector.magnitude(linearVelocity) > 50 or vector.magnitude(angularVelocity) > 50 then
for _, child in character:GetChildren() do
if child:IsA("BasePart") then
child.CanCollide = false
end
end
end
end
end)
It works by disabling collisions for players that are going too fast over a certain treshold locally. Humanoid automatically re-enables them after.