Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can i make a script that allows players to not collide? (non collide script)

i cant seem to figure out how to make a script that allows players to not collide with each other. all the yt vids a watched were no help. can somebody help.

1 answer

Sorry Last Time I messed up.insert a script in workspace

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:GetService("Players").PlayerAdded:connect(function(player)
 player.CharacterAdded:connect(function(char)
  char:WaitForChild("HumanoidRootPart")
  char:WaitForChild("Head")
  char:WaitForChild("Humanoid")
  wait(0.1)
  NoCollide(char)
  
  if player.Character then
   NoCollide(player.Character)
  end
     end)
 end)


--Give me a Good Review and follow my roblox account
--if doesnt work tell me

3 comments

0

Sorry Everyone i did it wrong

0

dude u did not put it in script format

0

yes

This discussion is preserved as it was. New answers, comments, and votes are closed.