How can i make players no CanCollide????
COMMUNITY QUESTION
How can i make players no CanCollide?
2 answers
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.
Thanks
This discussion is preserved as it was. New answers, comments, and votes are closed.

5 comments
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.
LOOL I join Roblox before you and I made games more than you and I script better than you XD
Also I can explain my script.I gave him correct Script instead of your replies which doesn't benefit!
wouldn't this not work because PhysicsService needs the part .CanCollide to be true and some parts of the humanoid have it false?
:connect() is deprecated. Use :Connect().