How to stop players from Auto-walking

So, I have a thing where if players spend more time in the game they get rewards. But I don’t want the player auto-walking to abuse this. Anyone have answers?

Im sorry but, what is AutoWalking?

1 Like

opening the chat while walking will make the player continue to walk

1 Like

What type of auto-walking are you talking about? Some kind of outside program that affects a player controls?
If you are talking about @sinkstealer’s way, then Roblox uses a change of input system so ‘auto walking’ wouldn’t work because there is no input change.

Oh right. I see. All you just have to do is to make sure you put borders so that they can’t walk forever. Right? Then you can just check to see if they have not moved after like 5 minutes then you can spawn a clickable gui to make sure that they are still active.

while preventing auto walk is pretty much impossible

but you can make it harder to claim the reward

  1. after some time a popup appears and the player must press a button within 5 seconds to claim the reward if they are AFK and miss the popup they don’t get the reward

  2. the popup should appear at a random location on the screen to prevent auto clickers

  3. you could make the player type a random number or random word to claim there reward

  4. this would not stop exploiters from being able to click the button or enter the random number but it should be good enough for most players

3 Likes

the auto walk where you do the chat while walking then the player is just walking forward forever.

Hm these solutions are a great Idea I am thinking about the gui one

Yes, but if a player is auto-walking like you referred to, they aren’t inputting anything.
I’m pretty sure that since there’s no input Roblox boots them for inactivity.

Maybe have a script that randomly makes the players sitdown?

Sample code that I wrote

local players = game:GetService("Players")

while true do
	task.wait(10)
	for i, v in pairs(players:GetPlayers()) do
		v.Character.Humanoid.Sit = true
	end
end

sorry for the super late reply but here

local userInputService = game:GetService("UserInputService")

userInputService.TextBoxFocused:Connect(function(textBox)
    if textBox.Name == 'ChatBar' then
        game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0
    end
end)

userInputService.TextBoxFocusReleased:Connect(function(textBox)
    if textBox.Name == 'ChatBar' then
        game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
    end
end)
1 Like

This might annoy players that aren’t auto-walking alot…

not if the position of the button is random or if they have to type a random number or word

did you read all the points

As I’ve said twice before, if a player isn’t making ANY changes to input AT ALL Roblox just kicks them anyway after a certain time.

Why script a solution to something that’s already taken care of?

its not very difficult to make your computer simulate key presses and mouse movement

some keyboard and mouse divers have it built in or they can use many of the software out there like https://www.autohotkey.com/

and 20 minutes is kinda long so the op might want the player from going afk for 20 minutes at a time

1 Like

You can’t access CoreGui from a script. This would work in theory, but not as a solution.

The reward system I have scripted is like this: every 5 minutes they get like 35 coins and 15 exp. And if they get 4x and just move thier mouse it might just destroy the game.

You can access the chat gui, game.Players.LocalPlayer.PlayerGui.Chat