I don't know how to make the trees disappear, but I can make a script that will fire the client when the command is typed.
SETUP:
1. (OPTIONAL) Create a folder in the replicated storage. Name it whatever you want (I named mine "Events", but it is up to you)
2. Create a remote event and place it in the folder (or just in the replicated storage if you don't want the folder). Name it whatever you want.
3. Create a script inside the "ServerScriptService". Name it whatever you want.
CODE:
Now we are going to move on to the code on the script. PLEASE don't copy and paste it then forget about it, it doesn't help you learn. Read it and try your best to understand it.
03 | commands.removetrees = function (sender,arguements) |
04 | game.ReplicatedStorage.Folder.Event:Fireclient(sender) |
07 | game.Players.PlayerAdded:Connect( function (player) |
08 | player.Chatted:Connect( function (message,recipient) |
09 | message = string.lower(message) |
10 | local splitString = message:split( " " ) |
11 | local commandPrefix = splitString [ 1 ] |
12 | local cmd = commandPrefix:split(prefix) |
13 | local cmdName = cmd [ 2 ] |
14 | if commands [ cmdName ] then |
16 | commands [ cmdName ] (player) |
18 | print ( "not a command" ) |
You can add more settings, all you have to do is copy and paste the removetrees function, change the "removetrees" in the title to the name of the command you want (let's say: "removeparticles") and then add in the event and change it to fire the event for that (instead of it firing "TreeEvent", it will fire "ParticleEvent".