Cars RNG [NEW MAP]
8.2k Views
40 Executions

Auto Race Checkpoints

Cars RNG
OSGames
OSGamesPublished 10
2 years ago
Please login to perform these actions:

Auto Race Checkpoints is a Cars RNG script for Roblox, uploaded to ScriptBlox on Mar 1, 2025.

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

when in line to race execute and "P" is to enable and disable. will need to start race manually every time im to slow to make this work welcome to take it and make it better. thanks Deep Seek for fixing, finish checkpoint and then reorganized the script -_- but still works so meh

View Raw
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local toggleKey = Enum.KeyCode.P -- Key to start/stop
local moveSpeed = 350 -- Constant car speed
local tolerance = 5 -- Distance threshold to consider checkpoint reached
local autoDriveEnabled = false
local currentVehicle = nil
local checkpoints = {}
local finishLine = nil
local hasReachedFinishLine = false 

local function GetVehicleFromDescendant(part)
    while part and part ~= game do
        if part:IsA("Model") then
            return part
        end
        part = part.Parent
    end
    return nil
end

local function FindAllRaceCheckpoints()
    local racesFolder = workspace:FindFirstChild("Races")
    if not racesFolder then
        return {}
    end

    local checkpointVisuals = {}
    for _, child in pairs(racesFolder:GetDescendants()) do
        if child.Name == "RaceCheckpointVisual" and child:IsA("BasePart") then
            table.insert(checkpointVisuals, child)
        elseif child.Name == "LastRaceCheckpointVisual" and child:IsA("BasePart") then
            finishLine = child
        end
    end



Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!