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

This simple ban script doesn't work (Output doesn't print anything)?

Hey,

I made a ban script just like the Jailbreak one, where it keeps teleporting you to the cage so that you don't escape. But for some reason, it doesn't work. The output doesn't print anything, either.

Heres the script:

local cheateruserid = {
	479196253,
	696503212
}

local localplayer = game.Players.LocalPlayer
local char = localplayer.Character

for i, v in pairs(cheateruserid) do
	if localplayer.UserId == v then
		while wait(1) do
			char.HumanoidRootPart.CFrame = script.Parent.TeleportPart.CFrame
		end
	end
end

3 comments

0

Where is the script located? Is it a LocalScript?

0

Who are you testing it on

0

1 answer

✓ Accepted answer

First off, local scripts do not run in the workspace (which is what I assume it to be). The character does not immediately load in secondly. Thirdly, this script could be easily bypassed by anyone who has a little bit of knowledge about exploiting.

Here's a fixed version. Make sure this is a ServerScript.

local cheateruserid = {
    479196253,
    696503212
}
game:GetService("Players").PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		if table.find(cheateruserid, plr.UserId) ~= nil then
		while char do
			char.HumanoidRootPart.CFrame = script.Parent.TeleportPart.CFrame
			wait(1)
		end
		end
	end)
end)

1 comment

0

I feel dumb...

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