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

on command walk thru players for admin what does it miss?

hello so i made a walkthruplayers script but what does it miss before i can put into something like hd admin also the script is made for r6 characters

"'game:GetService("RunService").Stepped:connect(function() for _, player in pairs(game.Players:GetPlayers()) do if player ~= game.Players.LocalPlayer then local character = player.Character if character then local head = character:FindFirstChild("Head") local torso = character:FindFirstChild("Torso") if head then head.CanCollide = false end if torso then torso.CanCollide = false end end end end end)''

1 comment

0

I hope that helps.

1 answer

✓ Accepted answer

local PS = game:GetService("PhysicsService") PS:CreateCollisionGroup("Player") PS:CollisionGroupSetCollidable("Player","Player",false)

game.Players.PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function(Character) Character:WaitForChild("HumanoidRootPart") Character:WaitForChild("Head") Character:WaitForChild("Humanoid") for i,v in pairs(Character:GetChildren()) do if v:IsA("BasePart") then PS:SetPartCollisionGroup(v,"Player") end end end) end)

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