Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make filtering enabled scripts work with filtering disabled?

I have a script meant for filtering enabled. How would I make that script work on filtering disabled? I need to know this because it breaks other mechanics in my game, and I don't want to search around for fixes for each and every thing. Here are my scripts:

Local script (Inside my tool)

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Mouse = Player:GetMouse()
local Event = game.ReplicatedStorage:WaitForChild("RemoteEvent")
local Tool = script.Parent
Tool.Activated:connect(function()
local Hit = Mouse.hit
Event:FireServer(Hit.p)
end)

Server script (Inside ServerScriptService)

local Event = game.ReplicatedStorage:WaitForChild("RemoteEvent")
local Spread = 5
local Radius = 5
local function GetNearbyPlayers(Position)
local Players = game.Players:GetPlayers()
local CharacterList = {}
for _, Player in next, Players do
local Character = Player.Character
if(Character)then
local CharacterPosition = Character.PrimaryPart.Position
local Distance = (Position-CharacterPosition).Magnitude
if(Distance<=Radius)then
CharacterList[#CharacterList+1] = Character
end
end
end
return CharacterList
end
Event.OnServerEvent:Connect(function(Player, HitPosition)
local Characters = GetNearbyPlayers(Player.Character.PrimaryPart.Position)
for _,Character in next, Characters do
Character:MoveTo(HitPosition + Vector3.new(Spread,0,Spread))
end
Player.Character:MoveTo(HitPosition)
end)

I tried watcing a few videos, but I didn't understand. Please help, I don't want my game's update to be a failure. :v

5 comments

1

If the scripts can handle FE, it can handle no FE, besides scripts that handle what should not get replicated to teh client.

0

Why would you need a script to work with non-FE anyway?

0

Because if my game is filtering enabled none of my other scripts work

0

So your title is the opposite of what you want to get done.....

0

Please indent, it makes code look very neat

1 answer

FE scripts will work without error with Non-FE games.

Their functions can change sometimes, but generally there's very few cases where FE compatible scripts won't work with non-FE games, and this normally comes down to the local aspect of things, where LocalScript changes don't replicate to the server.

In this case, this would work in a Non-FE game fine.

3 comments

0

also use FE

0

The script I have does not work with filtering enabled. How would I fix that

0

Dun ask two questions, ask one at a tiem

This discussion is preserved as it was. New answers, comments, and votes are closed.