Why is it that when i zoom in to play, this code is kicking me from game? it shouldn't

  1. i’m trying to make myself an anti exploit script and i have 2-3 exploiters actually helping me and giving me their code they use to bypass and such, and i found out that they change the humanoidrootpart size to be able to reach exploit with swords on my game.

  2. the code i made does work But, some reason it kicks the player when they zoom in to play the game? how is that possible? does the rootpart get changed when a player zooms in? what’s going on? i can’t seem to understand or figure out what’s going on with it

  3. i tried coding it differently multiple times but nothing seems to look wrong and it does run, but it kicks cause zoomin? idk. i’m going to try a few other things but i have no idea what’s happening so i need to find out the cause of it. any hints clues to lead to the right direction would be appreciated. or at least help explain cause i don’t understand. i’m just learning coding

--made by jjphariss/vividstar on roblox. 
--place this script in any tool you want
--this scripts checks a change in size when does it kicks whoever changed it
--this scirpt also checks to see who adds any script/localscript to the tool when does it kicks too
--UPDATE v1.1
--added it to where if a player changes the property of humanoidrootpart's size it will kick them. 



local parent = script.Parent

local Players = game:GetService("Players")
local plr = Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait(2)
 

local checker = script.Parent.Handle
local checker2 = checker.Parent.Handle 
local checktool = parent

local root = char:WaitForChild("HumanoidRootPart")



root.Changed:Connect(function(rooty)
	if root.Size or root.Position then
		plr:kick("kicked for trying to humanoidroot change")
	end
	
end)



checker2.Changed:Connect(function(check)
	
	
	if check == "Size" or checktool.Enabled == false then 
		plr:kick("kicked for trying to change tool size and enable property in tool")
	end
end)

parent.ChildAdded:Connect(function(detect)
	if detect.ClassName == "ScreenGui" or detect.ClassName == "BillboardGui" or detect.ClassName == "Script" or detect.ClassName == "LocalScript" then

		plr:kick("kicked for trying to exploit by adding stuff to tool")
	end
end)

Don’t bother making an anti-exploit script that runs on the client. They can just delete the script. Also, if I’m reading your code correctly, you are kicking players for changing the position of their root part, aka moving their character…?

no and no. not making this script be able to be detected from client anyways so idc. and it works i have 3 exploiters helping me so ok. but no that’s not what the code is doing it’s kicking the player if they change the root part size. least it should but some reason its kicking them cause of zooming in too. it’s working both ways some reason

this will just kick them no matter what happened to the rootpart, the conditional statement is irrelevant here

the solution to a problem is never to just give up, that’s a very closed-minded view.

1 Like

I’m telling you, your code is kicking players just by moving their characters. The Rootpart’s position is changed whenever you move your character.

thank you. and thank you for the other response. but yea how could i fix that then is there any way i can oh so you saying it’s kicking no matter what change happens to the root size and position?

i removed that and thought that too. doesn’t work regardless

if you want to check if a certain property changes, use

Object:GetPropertyChangedSignal("Size"):Connect(function()end) -- If the size changes, this fires

replace “Size” with the property

2 Likes

It’s not close minded, it’s a reminder on effective coding practices. Don’t waste time making an anti-cheat that’s client sided, take that time to develop something secure on the server. No reason to try debugging code that is exposed to the client and can just be modified or deleted to get around.

It’s a brutally honest recommendation to fix a loop hole now.

1 Like

dangggggggg dude i saw that getpropertysignal change before i was thinking of learning about it and try using it to fix this dammm dude thank you so much

1 Like

Not everything can be detected on the server, and not everything replicates to the server.
You can try to detect stuff on the server exclusively, but that can never and will never be enough.

If you have an FPS game for example, unless you’re using remotes to send a lot of data to the server, you’re not going to be detecting aimbots using server protections alone.

On the other hand, server security can be useful for preventing autofarming in something like a simulator game. I don’t believe remote security is the same thing as server security for this example, good network code ~= a server anticheat.

There are times where both sides are useful, and flat-out saying one of them is pointless is closed-minded.

1 Like

thank you i made my code work thanks to that getsignal

1 Like

btw i already know client sided can be easily detected. how you think people can even exploit things in their client and then affects server lol i used to exploit before and i had explorer ingame able to see scripts and edit them lol obviously you need to hide them or protect them codes. but thanks anyways, i got the script to work now, my anti, and now ima figure some ways to not be detected from client least try

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.