From 32916b23286b8c7beac279c5c965fe6021408eda Mon Sep 17 00:00:00 2001 From: bqmb3 Date: Sun, 9 Jun 2024 10:50:02 +0900 Subject: [PATCH] using vararg for SetLights --- main.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/main.lua b/main.lua index c9897ed..c3b2b9c 100644 --- a/main.lua +++ b/main.lua @@ -285,12 +285,20 @@ function F3X:CreateLight(Part, LightType) end --- Sets the properties of the specified lights. --- @tparam {{Part:Instance,LightType:"SpotLight"|"PointLight"|"SurfaceLight",[Range:number],[Brightness:number],[Color:Color3],[Shadows:boolean],[Face:Enum.NormalId],[Angle:number]},...} Changes A table of tables, each containing information about the lights to be set. +-- @tparam vararg table Changes A table containing information about the lights to be set. +-- @tparam Instance Changes.Part The part to which the light belongs. +-- @tparam "SpotLight"|"PointLight"|"SurfaceLight" Changes.LightType The type of light to be set. +-- @tparam[opt] number Changes.Range The range of the light. +-- @tparam[opt] number Changes.Brightness The brightness of the light. +-- @tparam[opt] Color3 Changes.Color The color of the light. +-- @tparam[opt] boolean Changes.Shadows Whether the light should cast shadows. +-- @tparam[opt] Enum.NormalId Changes.Face The face of the part to which the light is applied. +-- @tparam[opt] number Changes.Angle The angle of the light. -- @treturn nil -function F3X:SetLights(Changes) +function F3X:SetLights(...) assert(self._reinit, errors.notIntialized) if self._endpoint.Parent == nil then self._reinit() end - return self._endpoint:InvokeServer("SetLight", Changes) + return self._endpoint:InvokeServer("SetLight", {...}) end --- Creates decorations on the specified parts.