So I just started learning FilteringEnabled, and I wanted to learn it while I am making a battle royale game. I wanted a local script to fire an event to the server so that a script picks it up, but the local script does not even fire at all! So, here is the local:
local Gib = game.ReplicatedStorage:WaitForChild("Gib")
Player = game.Players.LocalPlayer
Mouse = Player:GetMouse()
tool = script.Parent.ToolData
k = script.Parent.HotkeyData
buttonPressed = false
function Press(key)
if (key == k.Value) and game.ServerStorage:FindFirstChild(tool.Value) ~= nil then
local Check = game.Players:FindFirstChild(Player)
if Check then
Gib:FireServer(Check, "Hyperlaser")
print ("Event fired")
end
if Player.Backpack:FindFirstChild(tool.Value) == nil and Player.Character:FindFirstChild(tool.Value) == nil then
local weapon = game.ServerStorage:FindFirstChild(tool.Value):clone()
weapon.Parent = Player.Backpack
repeat
Player.PlayerGui:FindFirstChild("HotKeyGuiThing"):remove()
until Player.PlayerGui:FindFirstChild("HotKeyGuiThing") == nil
if workspace:FindFirstChild("Weapon Crate") then workspace["Weapon Crate"]:Destroy()
end
end
end
end
Mouse.KeyDown:connect(Press)
wait (2)
repeat
Player.PlayerGui:FindFirstChild("HotKeyGuiThing"):remove()
until Player.PlayerGui:FindFirstChild("HotKeyGuiThing") == nil
And here is the Script:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local RemoteEvent = Instance.new("RemoteEvent",ReplicatedStorage)
RemoteEvent.Name = "Gib"
local function ForThePlayers(Player, Item)
print ("Event recieved")
if Player.Backpack:FindFirstChild(Item.Value) == nil and Player.Character:FindFirstChild(Item.Value) == nil then
local weapon = game.ServerStorage:FindFirstChild(Item.Value):clone()
weapon.Parent = Player.Backpack
print ("Event executed")
end
end
RemoteEvent.OnServerEvent:Connect(ForThePlayers)
My script might have some other issues, because what I like to do is to take some scripts from the RWiki and change them to my command, because I am still a beginner scripter, so please don't judge my skill. And if you do find those issues, give feedback please.

4 comments
God, I hate FilteringEnabled. Because you are a noob, just avoid it. I like the functionality of not having people under 13 visiting my game.
@kek ;_; ik but im trying tho pls don't judge ;;;;_____;;;;;
What is "Player" defined as in the localscript? Cause if it's actually just the localplayer then try FindFirstChild(Player.Name) instead.
Oh lol I just realised that you have shown what you defined it as. I'm stupid.