In my personal server C4's crash the game if used how can i ban them or get rid of them?
So you can ban more than C4!
1 | local notallowed = { "C4" , "MoreThingsYouWantToBan" , "TypeIt'sNameHere" } |
2 |
3 | game.Workspace.DecendantAdded:connect( function (child) |
4 | if child.Name = = notallowed and game.Players:GetPlayerFromCharacter(child) = = nil then |
5 | child:Destroy() |
6 | end ) |
I have not tested this script. It should work though.
Quick yet inefficient way to do this -Add everything to table that you made in the game, then check with if anything else was added and destroy it.
Or you could always do something like this.
1 | game.Workspace.DescendentAdded:connect( function (item) |
2 | if item.Name = = "whatever C 4 is called when it's inserted [ check this ] then |
3 | item:Remove() |
4 | end |
5 | end ) |
--MightyWanderer