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

How To Add Server Sided Checks For An Anti Exploit?

Is it possible to check if someone's walkspeed has changed using just a normal script? I want to do something like this but in a normal script not local: if game:GetService("Players").LocalPlayer.Character.Humanoid.WalkSpeed ~= 16 then game:GetService("Players").LocalPlayer:kick() end

In my normal script so far I have: game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local Humanoid = character:WaitForChild("Humanoid") Humanoid.WalkSpeed = 100 end) end)

This works, but if i try to do a check for this it doesnt work. game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local HumanoidRootPart = character:WaitForChild("HumanoidRootPart") local Humanoid = character:WaitForChild("Humanoid") while wait() do if Humanoid.WalkSpeed ~= 16 then player:kick() end end end) end)

IDK If this is possible or not but if it is pls help lol. If its not then what would be an alternative (other than local scripts)?

2 comments

0

put this in code block format

0

also ur script should work as you've said bc it already checks for a changed walkspeed value, or you could print something when it gets detected

2 answers

I do t think you need one because FilteringEnabled does it all for you so even if a hacker comes and hacks in your game it will only happen on his screen not anyone else. :)

Upvote and Accept if helped!

4 comments

2

This isn't exactly true, at least in the case of a humanoid's WalkSpeed. While yes, other clients won't actually see the exploiting client's WalkSpeed value itself change, they will see the exploiting client move faster as a direct result of them exploiting.

0

Ahhh, ok is that avoidable?

0

Wait you scripted shark attack?

0

Can you help me with a script I’ve been wanting to do for a while?

Simple Just Do A Loop

while wait() do
	for i,plr in pairs(game.Players:GetPlayers()) do
		if plr.Character ~= nil then
			local hum = plr.Character:FindFirstChildOfClass("Humanoid")
			if hum then
				if hum.WalkSpeed > 16 or hum.WalkSpeed < 16 then
					plr:Kick("Speed Exploiting Is Not Tolerated!")
				end
			end
		end
	end
end

2 comments

0

thank you :D

0

No Problem

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