-- Compiled with @isentinel/roblox-ts v4.0.11 local TS = _G[script] --* Command to teleport players to a target player. local getHumanoid = TS.import(script, TS.getModule(script, "@lisachandra", "core").utils.main).getHumanoid local _centurion = TS.import(script, TS.getModule(script, "@rbxts", "centurion").out) local CenturionType = _centurion.CenturionType local Command = _centurion.Command local Guard = _centurion.Guard local Register = _centurion.Register local adminOrDeveloper = TS.import(script, script.Parent.Parent, "guards").adminOrDeveloper local TeleportCommand do TeleportCommand = setmetatable({}, { __tostring = function() return "TeleportCommand" end, }) TeleportCommand.__index = TeleportCommand function TeleportCommand.new(...) local self = setmetatable({}, TeleportCommand) return self:constructor(...) or self end function TeleportCommand:constructor() end function TeleportCommand:teleport(_, from, target) local _cf = getHumanoid(target) if _cf ~= nil then _cf = _cf.RootPart if _cf ~= nil then _cf = _cf.CFrame end end local cf = _cf -- Check if the target's CFrame is valid. If not, the teleport cannot proceed. if not (typeof(cf) == "CFrame") then return nil end for _1, player in from do local humanoid = getHumanoid(player) local _rootPart = humanoid if _rootPart ~= nil then _rootPart = _rootPart.RootPart end local rootPart = _rootPart -- Force the player to stand up if they are sitting. local _result = humanoid if _result ~= nil then _result = _result.Sit end if _result == true then humanoid.Jump = true end if rootPart then rootPart.CFrame = cf end end end local _decorator = Command({ aliases = { "tp" }, arguments = { { type = CenturionType.Players, description = "The players to teleport", name = "from", }, { type = CenturionType.Player, description = "The target destination to teleport to.", name = "target", } }, description = "Teleports a player or set of players to one target.", name = "teleport", }) local _descriptor = Guard(adminOrDeveloper)(TeleportCommand, "teleport", { value = TeleportCommand.teleport, }) if _descriptor then TeleportCommand.teleport = _descriptor.value end local _descriptor_1 = _decorator(TeleportCommand, "teleport", { value = TeleportCommand.teleport, }) if _descriptor_1 then TeleportCommand.teleport = _descriptor_1.value end TeleportCommand = Register()(TeleportCommand) or TeleportCommand end return { TeleportCommand = TeleportCommand, }