Custom character not working correctly in FE enviroment

A guy I know came to me and asked me to fix a script for him, but I’m not sure how to do it, so I figured I’d take it here. I’ll let him explain it:

I’ve begun work on a game where the main objective is to push x to complete y, but I’ve ran into a problem. I’m using a custom character which involves a special script, alongside a part as the part that moves, with a robot mesh added on top to act as the “body.” It seems to work perfectly in studio, but when I test it ingame, the character spazzes out and flies around.



Enabling filtering just breaks the script, and I have no idea what else I can do. The script is a LocalScript located in the StarterPlayerScripts.
The script:

char = workspace:WaitForChild("Char")

w, a, s, d = 0,0,0,0
	k = k.KeyCode.Name
	if k == "W" then
		w = 1
	elseif k == "A" then
		a = 1
	elseif k == "S" then
		s = 1
	elseif k == "D" then
		d = 1
	elseif k == "Space" then

	k = k.KeyCode.Name
	if k == "W" then
		w = 0
	elseif k == "A" then
		a = 0
	elseif k == "S" then
		s = 0
	elseif k == "D" then
		d = 0

function jump()
	if ground and not jumping then
		jumping = true
		char.Velocity = v2(char.Velocity, 30)
		jumping = false

function v2(v3, b)
	return, b or 0, v3.Z)

workspace.CurrentCamera.CameraType = "Scriptable"
ignore = {char}
ground = false
jumping = false

while 1 do
	workspace.CurrentCamera.CFrame = +,4,5)*3, char.Position)

	local dt = game:GetService("RunService").RenderStepped:wait()
	local ismove = math.abs(a-d)+math.abs(w-s)>0
	local dir =
	if ismove then
		dir =,, 0, s-w)).lookVector
	local f1, f2, f3 = workspace:FindPartOnRayWithIgnoreList(,,-3)), ignore)	
	ground = f1
	if jumping then f1 = nil end
	char.BodyForce.Force = dir * 400 - v2(char.Velocity) * 20
		+(f1 and, ((f2.Y+2) - char.Position.Y)*300 + workspace.Gravity*char:GetMass() - char.Velocity.Y*30 ) or

Check out these pages for an in-depth explanation of how filtering enabled works:

The reason your script is not working when you turn on FilteringEnabled is that you are moving the characters on the client rather than on the server meaning each client will not be able to see other characters moving.


This is not always the case though, the problem could be that the client doesnt own the character, your character is always controlled by the client, so what OP needs to do is make the server set the network owner of the parts in the custom char (if they havent done that already)

Edit: after watching the video this issue seems different, but i do recommend testing setting all of the parts network owners to the client

1 Like