Converting old games to FE

Recently, as most of us know of, most (if not all) Roblox games which are classed as an Experimental Mode game are now locked to friends

This tutorial is in no way 100% correct, I am simply using what I know

This obviously killed many 2008 classics as well as some of my older games

What is Filtering Enabled
Before we actually get to converting, I should probably go over what FE is

FilteringEnabled prevents local scripts and server scripts from communicating with each other automatically, this also means that any parts, or instances which are changed on a client do NOT replicate to the server

Most (but not all) instances are auto replicated to the client on the server

Because local scripts and ServerScripts can no longer communicate with each other, this means scripts inside things like GUIs no longer work, as the mouse is client-side

Step 1: Find any connections between the client and the server

First of all, lets say you had a LocalScript that kills a Humanoid, on EM games, this will auto replicate to the server, but with FE it will not

To fix this, we will need a RemoteEvent. Using a listener on the server, this will fix the issue

Killing a player through a LocalScript with FE [code]

First of all, lets assume you have a RemoteEvent inside ReplicatedStorage called KillHuman

So lets hook up the listener to the event inside a ServerScript

game:GetService(“ReplicatedStorage”).KillHuman.OnServerEvent:Connect(function(p)
p.Character.Health = 0
end)

And so now when we call this event in a local script with :FireServer() it will kill the local player

If a value is required from the server we use RemoteFunctions()

Lets say you required an object out of ServerStorage, obviously, clients cant see ServerStorage, but the server can

Lets say this object was called Map1 and we want to give a clone of it to the client, lets use a RemoteFunction called GetMap1

As before, lets start with the ServerSide code

game:GetService(“ReplicatedStorage”).GetMap1:OnInvoke = function(player)
local objC = game:GetService(“ReplicatedStorage”).Map1:Clone()
return objC
end

And then so if we call this from the client with
``local obj = game:GetService(“ReplicatedStorage”).GetMap1:InvokeServer()```

The client will be given Map1 under the local variable obj

Step 2: Convert any server scripts from ScreenGuis and the player to local scripts

This is simply because ServerScripts will not run inside the player, but local scripts will

This is pretty easy to rework, just repeat Step 1 if the server is required to do anything

I hope this helped! :smiley:

ps please help me with understanding dividers

11 Likes

Probably a good idea to move this to #bulletin-board until you finish it.

3 Likes

Great to see you’re doing this - would recommend using the dividers (long strings of"-“) and titles (”-" underneath a line of text) to make it easier to scan. Make sure you leave a blank line underneath both of these, however.

This is a title

This is a divider


1 Like

Actually, all games that were previously Experimental Mode are now forced onto FilteringEnabled.

2 Likes

I just want to point this out before somebody does get it moved to #bulletin-board , for your ServerSide code, Clients can’t access ServerStorage by any means so it would return a nil object, the map should be in ReplicatedStorage if you want it to be returned correctly

Clients can use the ServerStorage, but there isn’t much of a point in doing so.
The contents of the ServerStorage are not replicated to clients, but clients can still locally put stuff in there.

5 Likes

Documentation may need updating then as they all say that Clients can’t access the area.

However, in the context of the guide, it is trying to set the variable through the event/function as a pre-existing thing in ServerStorage, not something which was added by the Client itself.

1 Like

oh well, we all go somewhere with our roblox knowledge :slight_smile:

ps the example code has been fixed

1 Like

One thing I want to note before I continue with my response: this thread belongs in #learning-resources:tutorials, not #learning-resources:community-tutorials-resources. You can move the thread by clicking the pencil beside your thread’s title.


This looks like a good starting tutorial to ease players into FilteringEnabled and teach them a few basics, however this tutorial poses a few things that I can’t sit well with. Maybe it’s just because of my general habits, but I believe that learning good practice is best from the get-go before you continue with anything else.

In terms of the thread itself, you may want to learn a couple neat tips and tricks for formatting your post so it looks neat, presentable and easy on the eyes. It also helps with the flow of information, given that you audiences may be young individuals who need easy visuals to comprehend the tutorial.

  • Add some pictures! Everyone loves to see pictures in a tutorial.
  • Indent your coding. Trust me on that one. :wink:
  • Proofread your posts. There’s a couple errors, such as a malformed code block near the end of Step 1’s content. People may miss it if it mingles too closely to other text.
  • Throw in some formatting. You can use things like three underscores (___) for horizontal lines, an “=” sign below text for titles, a “-” sign below text for sections, the tools already present in the topbar of the text box for writing posts and more.
  • Perhaps, optionally, add some further resources for users to delve deeper into the topic, such as a link to the Wiki’s take on your topic (if one exists) or maybe other related articles.
  • Anything else you can think of to spice up your tutorial.

Next, there’s one thing in your tutorial that I want to point out. This may serve as a pointer for anyone reading my response who doesn’t already know as well.

Regarding the example used, the first text says “killing a player through FE” which is then followed by “will kill the LocalPlayer” after the code example. It is important to understand that the client who sends a request to a remote, whether that be an Event or a Function, is always the first argument. To kill another player without much chance of breakage, tweak your code a bit like so:

Server Script:

game:GetService(“ReplicatedStorage”).KillHuman.OnServerEvent:Connect(function(Client, Target)
    if Target and Target:IsA("Player") and not (Target.Character == nil) and Target.Character:FindFirstChild("Humanoid") then
        Target.Humanoid.Health = 0
    end
end)

The above code works like so:

  • Client sends request to remote Remote:FireServer(items to send to server)
  • Server checks if there’s a Target specified, if the Target is a player, if they have a Character and if the Character has a humanoid
  • If any one of these is not true, it doesn’t go through, otherwise it moves to the next line
  • The target character’s humanoid health is set to 0, which kills them
  • WARNING - The code could throw an error if the “Humanoid” found in the Character doesn’t have a ClassName of Humanoid, since we didn’t check its class and only that at least one object in the Character is named “Humanoid”.

Not the best code since there’s ways to improve it, but this isn’t meant to be an advanced tutorial, I see. Alternatively, you can call Target.Character:BreakJoints() which will guaranteed kill the player.

Other than some small things like that, awesome tutorial. Look forward to hearing more from you! :slight_smile:

That KillHuman example is awful. Any exploiter can just fire that RemoteEvent for every player. Why are you letting clients kill people?

4 Likes

Just want to clarify - I personally would not ever do this. I have no business allowing clients to kill humanoids, or in the bigger picture, allow them to make any major server actions without appropriate verification or reason. Even then, I ensure that the server is very restrictive of what it allows the client to request or do.

The overall example is poor, though I simply expanded on how to kill another player with weak verification from the server as per the contents of the tutorial. If I start delving into such a topic now, I might as well just write my own thread regarding FilteringEnabled.