Noclip Panel Function

Hey! Little intro, so I have made a basic working admin panel. Anyways I have been wondering, how do you make a noclip function? YT Has not been very helpful so I am asking here.

1 Like

You can do this two ways, you can either change the statetype of your humanoid OR you can do it my way and just turn off the collision of the part
Here is a quick script that I wrote for you, you can use it if you want to go off of it, I tried to write as many comments as possible so you can understand it

local button = script.Parent --This is the button that you click
local noclip = false 
local runservice = game:GetService('RunService')
local player = game.Players.LocalPlayer --Getting the local player

button.MouseButton1Click:Connect(function() --Detects if player clicks the button
	if noclip == true then
		noclip = false
		script.Parent.Text = "not noclipping"
		noclip = true
		script.Parent.Text = "noclipping"

	if player then
		if noclip == true then --Detects if noclip is true
			for i, v in pairs(player.Character:GetDescendants()) do
				if v:IsA("BasePart") then --Detects if the part the player touches is a part
					v.CanCollide = false  --Turns off the parts collisions

Learn more about HumanoidStateType here: