Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is There a Way to Stop All Forces on a Player?

Asked by 4 years ago

And can I do it without anchoring a bodypart?

0
You can use: BodyVelocity FixRobloxz 61 — 4y
0
Or changing the walkspeed to 0 OR Use BodyPosition FixRobloxz 61 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

You can make the player CanCollide to false by using the following script:

script.Parent = game:GetService("ServerScriptService")
local PhysService = game:GetService("PhysicsService")
local PlayerGroup = PhysService:CreateCollisionGroup("p")
PhysService:CollisionGroupSetCollidable("p","p",false)

function NoCollide(model)
    for k,v in pairs(model:GetChildren()) do
        if v:IsA"BasePart" then
            PhysService:SetPartCollisionGroup(v,"p")
        end
    end
end

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(char)
        char:WaitForChild("HumanoidRootPart")
        char:WaitForChild("Head")
        char:WaitForChild("Humanoid")
        wait(0.1)
        NoCollide(char)
    end)

    if player.Character then
        NoCollide(player.Character)
    end
end)

This isn't a script requesting website so please give us what you already have so we can help you better

0
I never really asked for a script. I just asked a question. corncob567 275 — 4y
0
well... MinuhaYT 19 — 4y
Ad

Answer this question