Follow up to " **Cheat-proof Speedrun and timer** "

This is a follow-up post to Cheat-proof Speedrun and timer where I was trying to find out a way to make a timer server-side to avoid local script cheating for speedruns.

In this post, the main response was to use Remote Events to send the server-side timer to a local player’s GUI - to avoid cheating

I created a new system to do just that

Local Script

Local Script:

--[ Timer Start ]--

local start = workspace.Start
local event = game:GetService("ReplicatedStorage").RemoteEvent

deb = false
	if deb == false then deb = true 
	repeat wait() until -- "finished"
	deb = false


--[ Update GUI ]--

local text = script.Parent.TextLabel
local value = script.Parent.Value

local function timer(min, sec, milli)	
	value.Value = min + sec + milli
	text.Text = tostring(value.Value)

game.ReplicatedStorage.timer.OnClientEvent:Connect(function(min, sec, milli)
	-- text.Text = min .. " : " .. sec .. " : " .. milli

*note that I replaced some script with comments to make it faster to read

Local script Simplified:

  1. Touch Start Part > Fire Server Event
  2. On Client Event > Update GUI with values
Server Script

Server Script:

local finish = workspace.Finish
local event = game:GetService("ReplicatedStorage").RemoteEvent
local milli = 0
local sec = 0
local min = 0
	print(player.Name .. " has started!")
	while true do
		milli = milli + 1
		if milli > 9 then
			milli = 0
			sec = sec + 10
		if sec > 590 then
			sec = 0
			min = min + 1000
		game.ReplicatedStorage.timer:FireClient(player, min, sec, milli) -- Send info to client
		deb = false
			-- Stop timer
			-- Send info to leaderboard
		if workspace.Finish.Transparency > 0 then break end

*note that I replaced some script with comments to make it faster to read

Server script Simplified:

  1. On Server Event > Start Timer > Fire Client with Timer information
  2. Touch Finish Part > Stop Timer

The remote event that triggers the ‘player’ is triggering everyone’s GUI - just like FireAllClients()


I thought passing the ‘player’ argument through the FireClient() would only update that particular player’s GUI on - Server script, Line 26

game.ReplicatedStorage.timer:FireClient(player, min, sec, milli)

For me to fully understand what is going on my questions are:

  1. What am I doing wrong?
  2. How can I fix it?

In conclusion, I want to thank everyone that took their time to read this and a special thanks for any replies.

I also want to thank @CasuallyCritical, @rogchamp and @flamenco_687 for replying on my last post




My bad, I just fixed it
30 charssssssssss

1 Like

you ever fix the problem and how?

Option 1
You can record a default time.
If they finish before the default time, then there’s something wrong (however this should be taken into consideration as people can get really good at these type of games).

Option 2
A: localscript detecting if their walkspeed property is changed.
B: Record their speed on the server every X seconds.

After all, you could have all these checks take place.