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, 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.
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.
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.