Aprender
Clase de motor
ServiceProvider
No creable
No explorable

*Este contenido se traduce usando la IA (Beta) y puede contener errores. Para ver esta página en inglés, haz clic en aquí.


Resumen
Métodos
getService(className: string):Instance
Obsoleto
service(className: string):Instance
Obsoleto
Miembros heredados

Referencia API
Métodos
FindService
Escribir paralelo
ServiceProvider:FindService(className:string):Instance
Parámetros
className:string
Devuelve
Muestras de código
ProveedorDeServicios:EncontrarServicio
print(game:FindService("Parte"))
--> nil
print(game:FindService("EspacioDeTrabajo"))
--> EspacioDeTrabajo

GetService
ServiceProvider:GetService(className:string):Instance
Parámetros
className:string
Devuelve
Muestras de código
ProveedorDeServicios:GetService
local BadgeService = game:GetService("BadgeService")
local GameSettings = UserSettings():GetService("UserGameSettings")
print(BadgeService)
print(GameSettings)

getService
Obsoleto

service
Obsoleto

Eventos
Close
ServiceProvider.Close():RBXScriptSignal
Muestras de código
ProveedorDeServicios.Cerrar
local function onClose()
print("El lugar se está cerrando")
end
game.Close:Connect(onClose)

ServiceAdded
ServiceProvider.ServiceAdded(service:Instance):RBXScriptSignal
Parámetros
service:Instance

ServiceRemoving
ServiceProvider.ServiceRemoving(service:Instance):RBXScriptSignal
Parámetros
service:Instance

©2026 Roblox Corporation. Roblox, el logotipo de Roblox y "Powering Imagination" son algunas de nuestras marcas registradas y no registradas en los Estados Unidos y otros países.