Med Written By AxoI0tI

Filtering Enable Tutorial Created on: 01-01-2019

FE Scripting Basics

Introduction to FE (Filtering Enabled)

Filtering Enabled is one of the many core parts to a ROBLOX game. The job of FE is to block potentially harmful changes to the game made by a Client (A player).

Basically, to prevent exploiters from damaging your game.

However, the problem with FE is that it may have unwanted side affects, ie, breaking your game, and blocking good changes from the client.

To Solve this problem, we can use Remote Events and Remote Functions. This tutorial will be aimed at Remote Events

Creating a Part in the workspace when a gui button is clicked by the Client.

First, lets create the GUI.

Make sure that the Explorer and Properties tabs are open. >Click View at the top of your screen, then Explorer and Properties.

Hover over StarterGui and click on the + button. Instert a ScreenGui object. (You can name this whatever you want.)

Hover over your newly created ScreenGui object and click the + button. Insert a TextButton. (You can customize this to your heart's desire! Again, name doesn't matter.)

Next, it's time to create our RemoteEvent.

Firing the RemoteEvent on the Client.

Time to code our RemoteEvent! Yay!

First, hover over the ReplicatedStorage Gui. Click the + Button and insert a RemoteEvent.

(Leave the name as Remote Event for now.)

Why are we putting the RemoteEvent here?

The reason for this is because the ReplicatedStorage Service allows for both Clients and the Server to access it. This means that it's a perfect place to store our remote event!

Next, head back to your TextButton object in your StarterGui.

Hover over it, and click the + Button, and insert a LocalScript.

Open up the LocalScript, and write in the following code:

local RS = game:GetService("ReplicatedStorage")

local BrickEvent = RS.RemoteEvent

script.Parent.MouseButton1Click:Connect(function()

     BrickEvent:FireServer() --This is going to Fire the event, and it is going to tell the server to wake up, and execute the code it's been told
end)

And that's all we need to do on the Client.

Next job, is handling the code on the Server.

Find ServerScriptService in the Explorer panel. Hover over it, and click the + button.

Insert a Script.

Open the script and write the following code:

local RS = game:GetService("ReplicatedStorage")
local BrickEvent = RS.RemoteEvent

BrickEvent.OnServerEvent:Connect(function() --When the event is fired, any code inside this Function will be executed on the SERVER.
    local Part = Instance.new("Part")

--If you want to change any of the parts properties, write it in between the code that creates the new part,, and the line of code that parents the part.



Part.Parent = game:GetService("Workspace")
end)


Finishing Note

And that's it!

That is my quick and easy tutorial on how to do FE scripting!

NOTE: RemoteEvents / Functions can only be used between the SERVER and the CLIENT!

If you want to do script communication between CLIENT and CLIENT or SERVER to SERVER, then you should use a BINDABLE event / function!

Med Written By AxoI0tI

See AxoI0tI's profile on Roblox

Discussion