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

How can i make players no CanCollide?

Asked by 5 years ago

How can i make players no CanCollide????

2 answers

Log in to vote
0
Answered by
Voxozor 162
5 years ago

Hello nikoladzon! Insert a Script at WorkSpace and place this:

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)

I hope that helps you. Good luck.

0
I just instantly detected the fact that you copied that from either ToolBox or somewhere else while telling nikoladzon to place the script in the Workspace. AIphanium 124 — 5y
1
LOOL I join Roblox before you and I made games more than you and I script better than you XD Voxozor 162 — 5y
1
Also I can explain my script.I gave him correct Script instead of your replies which doesn't benefit! Voxozor 162 — 5y
0
wouldn't this not work because PhysicsService needs the part .CanCollide to be true and some parts of the humanoid have it false? the8bitdude11 358 — 5y
0
:connect() is deprecated. Use :Connect(). namespace25 594 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

Thanks

Answer this question