I have no real experience with either of these so any help is appreciated.
I have created scripts that work if filtering enabled is not on. I now need to rewrite them for filtering enable due to my game being exploited.
Here is what needs to happen in pseudo.
--[[ When the player clicks create a new part. Set the parts CFrame to the part in the gun called main. Give the part a parent. Add the part to game service "debris" to be removed after 2 seconds. Make the part black. Scale the part to the smallest size possible. Give the part a velocity. When the part hits something check for a humanoid. If the part finds a humanoid then get the player from character. respawn the player who was hit. Add 1 to the shooters kills. Add 1 to the deaths of the player shot. --]]
My attempts to do this with filtering enabled respawned the shooter, not the person who was shot.
So, you'll want a remote event to trigger in order to respawn a hit player. You can't do this on the client side (the LocalScript side), so you'll have to use a RemoteEvent object.
On the server, you'll take the RemoteEvent and give it the player respawn logic, like so:
local event = game.ReplicatedStorage.RemoteEvent --replace with wherever the RemoteEvent is event.onServerEvent:connect(function(player, toRespawn) -- resppawn the player here end)
Note that fact that you get the player that called the event automatically in the arguments.
On the client, you'll do this:
local event = game.ReplicatedStorage.RemoteEvent --replace with wherever the RemoteEvent is --when the person is hit. The variable of the hit player is 'toRespawn' event:FireServer(toRespawn)