a dusty trip [🐺WOLF]
34.7k Views
60 Executions

Press P to Lod Rod

a dusty trip
Aura
AuraPublished 25
3 years ago
Please login to perform these actions:

Press P to Lod Rod is an a dusty trip script for Roblox, uploaded to ScriptBlox on May 8, 2024.

Does it work?

No reports yet

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

Also noticed:

Description

It auto loads the road when you press P

View Raw
local function teleportToPart(part)
    local player = game.Players.LocalPlayer
    if player and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
        player.Character.HumanoidRootPart.CFrame = part.CFrame + Vector3.new(0, 3, 0)
    end
end

local roadsModel = game.Workspace.models.roads

local function findAndTeleport()
    if roadsModel then
        local highestNumber = 0
        local targetPart = nil

        for _, part in pairs(roadsModel:GetChildren()) do
            local partNumber = tonumber(part.Name)
            if partNumber and part:IsA("Part") then
higher
                if partNumber > highestNumber then
                    highestNumber = partNumber
                    targetPart = part
                end
            end
        end

        if targetPart then
            teleportToPart(targetPart)
        else
            print("No numeric parts found in the roads model.")
        end
    else
        print("Roads model not found in Workspace.")
    end
end

game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessedEvent)
    if input.KeyCode == Enum.KeyCode.P and not gameProcessedEvent then
        findAndTeleport()
    end
end)


Comments

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