Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 6 years ago

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

1
If the scripts can handle FE, it can handle no FE, besides scripts that handle what should not get replicated to teh client. hiimgoodpack 2009 — 6y
0
Why would you need a script to work with non-FE anyway? XAXA 1569 — 6y
0
Because if my game is filtering enabled none of my other scripts work User#18979 5 — 6y
0
So your title is the opposite of what you want to get done..... hiimgoodpack 2009 — 6y
0
Please indent, it makes code look very neat saSlol2436 716 — 6y

1 answer

Log in to vote
0
Answered by
CootKitty 311 Moderation Voter
6 years ago

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.

0
also use FE CootKitty 311 — 6y
0
The script I have does not work with filtering enabled. How would I fix that User#18979 5 — 6y
0
Dun ask two questions, ask one at a tiem CootKitty 311 — 6y
Ad

Answer this question