Universal Script 📌
81 Views
78 Executions

Follow command

Universal Script 📌
foreverinaloop
foreverinaloopFirst script
3 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

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

Also noticed:

Description

i made this with ai please don't be made at me im new too this stuff :C

View Raw
-- Ultra-Smart Hybrid Follower (With "NUH UH" Ground Recovery Command)
local Players = game:GetService("Players")
local PathfindingService = game:GetService("PathfindingService")
local RunService = game:GetService("RunService")

local localPlayer = Players.LocalPlayer
local targetPlayer = nil
local followConnection = nil
local bodyVelocity = nil
local bodyGyro = nil

-- Configuration
local STUCK_TIME_LIMIT = 0.4
local AIR_THRESHOLD = 5 

local path = PathfindingService:CreatePath({
    AgentRadius = 1.5,
    AgentHeight = 4.5,
    AgentCanJump = false, 
    AgentSlope = 45
})

local function removeFlightForces()
    if bodyVelocity then bodyVelocity:Destroy(); bodyVelocity = nil end
    if bodyGyro then bodyGyro:Destroy(); bodyGyro = nil end
end

-- Safely finds the closest solid ground surface underneath the character
local function teleportToNearestGround(rootPart)
    local raycastParams = RaycastParams.new()
    raycastParams.FilterType = Enum.RaycastFilterType.Exclude
    raycastParams.FilterDescendantsInstances = {rootPart.Parent}
    
    -- Cast a long ray straight down (up to 500 studs) to find a floor
    local raycastResult = workspace:Raycast(rootPart.Position, Vector3.new(0, -500, 0), raycastParams)
    
    if raycastResult then
        -- Snap to the intersection position + a minor upward offset so your feet don't clip into the floor
        rootPart.CFrame = CFrame.new(raycastResult.Position + Vector3.new(0, 3, 0))
    end


Comments

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

Tags

More universal scripts

See all
Universal Script 📌
9.8k
60.7k
Bumped 12 minutes ago
Key System
Universal Script 📌
3.9k
10.4k
Bumped 13 minutes ago
Script hub
272.5k
884.6k
Bumped 31 minutes ago
Key System

Script hub

#16 this week

Verified script badgeAxon Hub 60+ Games & 800+ Features

Script hub
30.3k
92.0k
Bumped 5 hours ago
Key System

Script hub

#2 this week

Verified script badgeArcane Hub | 125+ Games & 4000+ Features