The Player Teleport section of KCSH auto-populates a button for every player currently in the server and updates in real time as players join or leave. No configuration is needed — just click a name and your character is instantly relocated to that player’s position.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/kaladoodotlua/KCSH/llms.txt
Use this file to discover all available pages before exploring further.
How it works
On script load, KCSH iteratesPlayers:GetPlayers() and calls the internal plrbtn(player) helper for each result. plrbtn creates a button labelled with the player’s Name, then wires up a MouseButton1Click handler that reads the target’s HumanoidRootPart.CFrame and assigns it directly to your own HumanoidRootPart.CFrame.
Two additional listeners keep the list current for the entire session:
Players.PlayerAdded— callsplrbtn(player)for the newcomer, adding a fresh button.Players.PlayerRemoving— finds the button byplayer.Nameand calls:Destroy()on it.
plrbtn function (source)
task.wait(0.1) after button creation gives the UI a frame to parent the new instance before properties are set on it.
Initialization and live-update hooks (source)
Layout
Player teleport buttons live inside a dedicatedFrame named "99" (g in source), which sits at the bottom of the main ScrollingFrame beneath the movement buttons. The frame uses AutomaticSize = Y so it expands vertically to fit however many players are present.
A UIListLayout inside the frame controls arrangement:
| Property | Value |
|---|---|
FillDirection | Horizontal |
HorizontalFlex | Fill |
Wraps | true |
Padding | 10 px |
TextWrapped = true and TextSize = 15 so long usernames still fit within their allocated cell.
Limitations
Teleportation reads
player.Character.HumanoidRootPart directly with no nil-check. If the target player has just joined, is currently respawning, or their character has not yet loaded, Character or HumanoidRootPart may be nil — causing a script error. Wait a moment after a player spawns before attempting to teleport to them.