Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to prevent to rename my humanoid?

Asked by
kaemi 21
6 years ago
Edited 6 years ago

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?

0
turning on filtering enabled is an easier and faster way to solve this. turn it on in workspace properties. Faazo 84 — 6y

2 answers

Log in to vote
0
Answered by
Bertox 159
6 years ago
Edited 6 years ago

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
0
Ayyyy thanks kaemi 21 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

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.

Answer this question