Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to prevent to rename my humanoid?

well i need some help im trying to make a humanoid localscript that prevent hackers to rename their humanoids but i can't set them to humanoid name if renamed by the way here is the code

while wait(0.00) do
	if script.Parent ~= script.Parent.Name.Humanoid then
		script.Parent.Parent.Name = "Humanoid"
		script.Parent.Parent.WalkSpeed = 3
		script.Parent.Parent:TakeDamage(50)
	end
end

can you help me here?

1 comment

0

turning on filtering enabled is an easier and faster way to solve this. turn it on in workspace properties.

2 answers

✓ Accepted answer

You can either turn on FilteringEnabled like Faazo said above, or you check all Children of the Character Model every few seconds, and check if the ClassType is a Humanoid

for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do --gets children of player character
	if v:IsA("Humanoid") then --checks the ClassName
		v.Name = "Humanoid" --renames
	end
end

1 comment

0

Ayyyy thanks

Make a local script inside StarterGui

while true do
if game.Players.LocalPlayer.Character.Humanoid.Name = "Humanoid" do
print(sucsess)
else
game.Players.LocalPlayer:Kick("Kicked for Executing Exploits")
end

it should work because it's scanning the humanoids name over and over again and if the name gets changed then it kicks em.

This discussion is preserved as it was. New answers, comments, and votes are closed.