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

How do I make a script where it kills someone when they noclip?

Most people have noclip hacks so how do I stop them.

3 answers

I never created a anti no clip script, but here is an idea: Use raycasting from their last position to their current position and check if the ray intersects a part that is collidable. If it intersects, you can kick, ban or kill them.

1 comment

0

how do I do that

It honestly depends on your situation. If you're creating a VIP room or whatever then just create a block a little smaller than the entire room size, then if a player touches it and they don't have VIP then kill, kick, or ban the player. If it's for buildings and such you could use Raycasting which is very complicated in my opinion. Luckily a thread has been made on the ROBLOX dev forums already. Here's the thread and hopefully it'll help you out in some form:

https://devforum.roblox.com/t/ways-to-patch-common-exploits/98961

Or just use a script like this.

script.Parent = game.Workspace
Rig = "R15"

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
        if Rig == "R15" then
            while wait() do
                if char:WaitForChild("UpperTorso").CanCollide == false then
                    plr:Kick("Suspicious Movement")
                end
                wait(5)
            end
        elseif Rig == "R6" then
            while wait() do
                if char:WaitForChild("Torso").CanCollide == false then
                    plr:Kick("Suspicious Movement")
                end
                wait(5)
        elseif Rig ~= "R6" and Rig ~= "R15" then
            error("Please set Rig to either R15 or R6. This is case sensitive.")
        end
    end)
end)

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