hello im having a issue for passing arguments in a fireclient, here is how is passing out.
and i dont know how to solved, here is how i order it, if someone helps me to understand and help me solve the error
the arugments itself:
local dmdn = {}
--hitbox and dmg modules
local raycast = require(game.ReplicatedStorage.RaycastHitboxV4)
local damage_handler = script.Parent.Parent.Parent.Damage_Handler
local function damage(witch: "cummunhit" | "pull" | "bethit" | "blockhit" | "breakblockhit" | "perfectblockhit" | "misshit", ...)
damage_handler:FireServer(witch, ...)
print("aadasd")
--this is the damage deal and other shenanigans, not very important for the topìc
end
print("AAA")
--arguments:
function dmdn.dmg1(player, combotype, dmg, debtime, bodyfdire, soundid, partt, cframee, sizee, strongornah, ragdoll, stuntime)
--code stuff that is not important for this topic
end
return dmdn
first passing arguments:
local dmgstype = require(script.TypesOfDamages.hitbox)
local dmgscript = {}
function dmgscript.new(player)
local cratething = {}
function cratething:FirstType(...)
dmgstype.dmg1(player, ...)
end
return cratething
end
return dmgscript
bindable event for passing the arguments to the remote event for client:
script.Parent.Event:Connect(function(player, d, ...)
local module = require(script.Parent.Parent.Hitbox_Call)
if d == "damage1" then
local newd = module.new(player)
newd:FirstType(...)
end
end)
the remote event:
game:GetService("ReplicatedStorage"):WaitForChild("Combat").Hitbox_Handler_Remote.OnClientEvent:Connect(function(plr, something, ...)
local module = require(script.Hitbox_Call)
print(something, ...)
local bruh = script.Event
bruh:Fire(plr, something, ...)
end)
local function hitbox(wich: "damage1" | "damage2", ...)
Hitbox_handler:FireAllClients(player, wich, ...)
print("d")
end
--*some event to shoot the function*
task.spawn(function()
local hitboxtable = {
"all",
1,
1,
rot.CFrame.lookVector * 40,
"rbxassetid://6978814463",
rightarm,
CFrame.new(0,0,1),
Vector3.new(5,5,5),
"normal",
true,
1
}
hitbox("damage1", hitboxtable)
end)
and here the error that gives me on the output:
i really dont know what im doing wrong, its my first time using the 3 dots (…) on a argument and use it tbh.
and here is how is orded the scripts:
(is on ReplicatedFirst all those script)