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

How to make a player noclip? (Help with admin)

So I am making an admin script, and I am trying to figure out how to noclip a player. Can anyone help? Here's an example of a command:

Commands.kick = function(Sender,Arguments)
	local Argument = PartialMatch(Arguments[1]);
	if not Argument then return false end;
	Argument:Destroy()
end

1 comment

0

yo are you gonna accept my answer

1 answer

You'd probably be interested in Collision Groups, they allow you to set what collides with what. You could use that to loop through the character parts and make it so that it cant interact with walls and whatever else you want.

local ps = game:GetService("PhysicsService")
ps:CreateCollisionGroup("Character")
ps:CreateCollisionGroup("Parts")
for i, v in ipairs(plr.Character) do
	if v:IsA("BasePart") or v:IsA("MeshPart") then
		ps:SetPartCollisionGroup(v, "Character")
	end
end
for i, v in ipairs(game.Workspace) do
	if v:IsA("Part") then
		ps:SetPartCollisionGroup(v, "Parts")
	end
end
ps:CollisionGroupSetCollidable("Character", "Parts", false/true)

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