Skip to content

Commit

Permalink
using vararg for SetLights
Browse files Browse the repository at this point in the history
  • Loading branch information
bqmb3 committed Jun 9, 2024
1 parent 7427ab5 commit 32916b2
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 32916b2

Please sign in to comment.