Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Created by: V3N0M_Z (V3N0M#8545)
- Version: 0.25
- API:
- Constructor:
- Path SimplePath.new(Model Rig, [Optional] table PathParams, [Optional] bool StorePath)
- -- Creates new Path with optional PathParams
- -- Use one Path per rig
- -- If StorePath is true, the Path object specific to the rig will be save
- -- If you run SimplePath.new(Rig), an existing Path object will return if it was saved
- Functions:
- bool Path:Run(Vector3 FinalPosition, [Optional] bool VisualizePath)
- -- Starts pathfinding and moves the Rig to FinalPosition
- -- Enable VisualizePath to visualize path // Default: false
- -- Returns true if path is successful
- void Path:Stop([Optional] string Status)
- -- Stops moving the Rig and fire Path.Completed sending Status
- number Path:Distance(Vector3 TargetPosition or BasePart TargetPart)
- -- Returns the vector magnitude between the Rig and Target
- void Path:Destroy()
- -- Destroy Path
- Events:
- RBXScriptSignal Path.Completed(string Status, Model Rig, Vector3 FinalPosition)
- -- Fires when pathfinding has ended
- -- Check status to see why pathfinding ended
- RBXScriptSignal Path.WaypointReached(bool Reached, int CurrentWaypoint, table Waypoints)
- -- Fires when a waypoint has been reached
- RBXScriptSignal Path.Blocked(int BlockedWaypoint, int CurrentWaypoint, table Waypoints)
- -- Fires when a waypoint has been blocked
- Properties:
- Model Path.Rig [readonly]
- -- Returns active Rig
- Humanoid Path.Humanoid [readonly]
- -- Returns Rig.Humanoid
- BasePart Path.HumanoidRootPart [readonly]
- -- Returns Rig.PrimaryPart
- Instance Path.Path [readonly]
- -- Returns Path object
- Vector3 Path.InitialPosition [writeonly]
- -- Change InitialPosition of the path // Default: Rig.PrimaryPart.Position
- int Path.Timeout [writeonly]
- -- Change Rig.HumanoidMoveTo timeout // Default: Automatically Calculated
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement