Take away character control from the client

Yes, it is possible, however, I do not recommend using a simple for loop since more children can be added later to the character, instead, disable character autoloads and make your own server-sided character system if you wish, like ChikyNoids one.

Take into account that this behaviour is intentional, client having control of his avatar is made to ompitimize the game performance (lag etc). Instead, if you wish, use the original character system but with an anti exploit checking validity of positionsā€¦ etc, and stop using the character or relying on it for important things

local Game = game
local Players = Game:GetService("Players")

local function OnPlayerAdded(Player)
	local function OnCharacterAdded(Character)
		if not Player:HasAppearanceLoaded() then Player.CharacterAppearanceLoaded:Wait() end
		task.wait()
		for _, Descendant in ipairs(Character:GetDescendants()) do
			if Descendant:IsA("BasePart") then Descendant:SetNetworkOwner() end
		end
	end
	
	Player.CharacterAdded:Connect(OnCharacterAdded)
end

Players.PlayerAdded:Connect(OnPlayerAdded)

This works for me.

This works, but understandably since the network owner is the server, there is major input delay, I guess this could be a good way to punish exploiters? by setting their characters network ownership to the server.

A good way to punish exploiters is simply donā€™t let them play lol

I donā€™t mean certified exploiters, Iā€™m talking about people who managed to trigger the anti cheat, its best not to ban/kick them because it could be a false positive, so instead Iā€™ll just make their characterā€™s network ownership the server so they cant exploit anymore, and in the case of a false positive the player will just think heā€™s lagging.

1 Like

automated anticheat should never ban players nor kick them
they should restrict things, like jailbreak character position anticheat

Only actual mods should ban

Is there a way to give the player back the controls to their character? Sorry, I am not too familiar with SetNetWorkOwnership.

Ya, just set the NetworkOwnership back to the player (player instance under players)

1 Like

I tried doing

v:SetNetworkOwner(player)

but nothing happened.
The full code is:

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		if character then
			task.wait(3)
			for _, v in pairs(character:GetDescendants()) do
				if v:IsA("BasePart") then
					v:SetNetworkOwner(nil)
					task.wait(5)
					v:SetNetworkOwner(player)
				end
			end
		end
	end)
end)

I think I am missing something but I donā€™t know what it is.

idrk why nothing happens, idk a lot about NetworkOwnership myself, you can read the docs for help.

(not recemended) Chickynoid exists replacing client control however