How to enable no-clip in LUA?

I’m looking for a Lua command (or a line of code) that puts the player into no-clip.

Thanks :slight_smile:

[lua]
concommand.Add(“noclip_start”, function(ply)
ply:SetMoveType(MOVETYPE_NOCLIP)
end)

concommand.Add(“noclip_end”, function(ply)
ply:SetMoveType(MOVETYPE_WALK)
end)
[/lua]

(server)

It can be done easier:
[lua]
concommand.Add(“noclip_toggle”, function(ply)
RunConsoleCommand(“noclip”)
end)
[/lua]

what if noclip is disabled? why wouldn’t they just press v to fly around if this worked? this is literally just creating an alias of the noclip command

Why would you create a concommand that just runs another console command when the player can just use the other console command in the first place?

This is for a Ghostbusters Mod I’m creating. This was to simulate a ghost flying about.

please add triggered feminists

:speechless: