This remote event from client doesnt work, no erros in output

idk HOW, IDK WHERE, OR HOW TO FIX THIS SCRIPT, THIS remoteevent script have NO erros in the output, NOTHING, AND STILL DOESNT WORK, NOTHING HAPPEN, PLS IM LITERALY LOSING MY MIND HERE, I BEG FOR HELP

here the script (localscript):

game.ReplicatedStorage.Combat.Hitbox_Handler_Remote.OnClientEvent:Connect(function(plr, something, ...)
	local module = require(script.Hitbox_Call)
	local c = game.Players.LocalPlayer
	local any = {...}
	print("ADASDWASD")
	if something == "damage1" then
		local new = module.new(plr)
		new:FirstType(any)
		print("a")
	end
end)
1 Like

Are you SURE it’s being properly fired on the server? Check to make sure you’re firing the correct event, and I suggest putting a print statement before requiring the module so you know it’s none of that

…ejem:

	local function hitbox(wich: "damage1" | "damage2", ...)
		local any = {...}
		Hitbox_handler:FireClient(player, wich, any)
		print("d")
	end
	local hitboxtable = {
		"all",
		1, 
		1, 
		rot.CFrame.lookVector * 50, 
		"rbxassetid://9207578492", 
		ntorso,
		CFrame.new(0,0,0),
		Vector3.new(5, 5, 5),
		"normal",
		0.7
	}
    hitbox("damage1", hitboxtable)

---too much coding on the script, but INDEED is a server script,
1 Like

Is the player the correct player? Would be nice if you send the full code so I could properly see what might be erroring

1 Like

dude yea the player is correct, is a module script:

local module = {}
module.__index = module
local basicsfolder = script.Basics
local somefunctions = script.SomeFunctions
local projectiles = script.Projectiles
local anchor = require(basicsfolder.Anchor)
local attributechange = require(basicsfolder.AttributeChange)
local visible = require(basicsfolder.Visible)
local transparency = require(basicsfolder.Transparency)
local trail = require(basicsfolder.Trail)
local valuechange = require(basicsfolder.ValueChange)
local velocity = require(basicsfolder.VelocityStuff)

local indicators = require(somefunctions.Indicators)
local coldowns = require(somefunctions.CooldownGuis)
local bareffect = require(somefunctions.beeffect)
local barragehandler = require(somefunctions.Barragehanler)
local projectilehandler = require(projectiles.moduleprojecttest)
local donutt = require(somefunctions.DonutTw)
local timefroze = require(somefunctions.timefrozeinvoque)

--defaultmoves
local m1modul = require(script.m1_move)
local blockmold = require(script.block)

local visualizerremote = game:GetService("ReplicatedStorage").Combat.Client_effect
local Hitbox_handler = game:GetService("ReplicatedStorage").Combat.Hitbox_Handler_Remote
local cooldowns = {}

local loadedAnimations = {} -- store animations here 

local dmg = require(script.Damage)

local run = game:GetService("RunService")

function module.new(player)
	
	local function hitbox(wich: "damage1" | "damage2", ...)
		local any = {...}
		Hitbox_handler:FireClient(player, wich, any)
		print("d")
	end
	
	local chr = player.Character
	local human = chr.Humanoid

	local head = chr["Head"]
	local ntorso = chr["Torso"]
	local rightarm = chr["Right Arm"]
	local leftarm = chr["Left Arm"]
	local rightleg = chr["Right Leg"]
	local leftleg = chr["Left Leg"]
	local rot = chr["HumanoidRootPart"]

	local stand = chr.Stand

	local spec = chr.Spec

	local punchsfx = ntorso:WaitForChild("Swing")
	local dodgesfx = ntorso:WaitForChild("Dodge")
	local blocksfx = ntorso:WaitForChild("Guard")
	local foldeattack = player:WaitForChild("PvpFolder"):WaitForChild("AttacksValuesFolder")

	local newmodule = {
		["Default_moves"] = {
			["M1"] = function(brotha)
				if chr:GetAttribute("activu") == true then 
					return
				end
				m1modul.punch(player, punchsfx, foldeattack, brotha)
			end;
			["BLOCK"] = function(val)
				local uno = human:LoadAnimation(foldeattack.HabilityBlock)
				local dos = human:LoadAnimation(foldeattack.SpecBlock)
				if val == true then
					local blck = blockmold.new(player)
					blck.blocksond = blocksfx
					blck.anim1 = uno
					blck.anim2 = dos
					blck:startblock()
				elseif val == "blockout" then
					local block = blockmold.findblock(player.Character)
					if block then
						block:Blockout(player)
					end
				else
					local block = blockmold.findblock(player.Character)
					if block then
						block:Stopblock()
					end
				end
			end;
			["BLOCK-OUT"] = function()
				local block = blockmold.Blockout(player.Character, player)
			end;
			["Dash"] = function()
				
			end;
		};
		["Standless"] = {
			["Attack"] = function(brotha)
				local hitboxtable = {
					"all",
					1, 
					1, 
					rot.CFrame.lookVector * 50, 
					"rbxassetid://9207578492", 
					ntorso,
					CFrame.new(0,0,0),
					Vector3.new(5, 5, 5),
					"normal",
					0.7
				}
				if chr:GetAttribute("activu") == true then
					return 
				end
				if table.find(cooldowns, player.Name.. "testcd") then

				elseif not table.find(cooldowns, player.Name.. "testcd") then
					table.insert(cooldowns, player.Name.. "testcd")
					chr:SetAttribute("activu", true)
					punchsfx:Play()
					human.JumpPower = 0
					human.WalkSpeed = 2
					human.AutoRotate = false
					local anim = human:LoadAnimation(stand.Click2)
					anim:Play(0.1, 1, 1)
					task.wait(0.5)
					task.spawn(function()
						hitbox("damage1", hitboxtable)
					end)
					task.wait(0.1)
					human.AutoRotate = true
					human.JumpPower = 50
					human.WalkSpeed = 16
					coldowns.CooldownGuiNormal(player, 0.1, "test")
					chr:SetAttribute("activu", false)
					task.wait(0.1)
					table.remove(cooldowns, table.find(cooldowns, player.Name.. "testcd"))
				end
			end;
		};
		["Street"] = {
			["Kick"] = function()
				if chr:GetAttribute("activu") == true then
					return 
				end
				if table.find(cooldowns, player.Name.. "kickcd") then

				elseif not table.find(cooldowns, player.Name.. "kickcd") then
					table.insert(cooldowns, player.Name.. "kickcd")
					chr:SetAttribute("activu", true)
					punchsfx:Play()
					human.JumpPower = 0
					human.WalkSpeed = 2
					local anim = human:LoadAnimation(spec.FrontKick)
					anim:Play(0.1, 1, 1)
					indicators.indicators(player,"yellow", 1)
					human.AutoRotate = false
					task.wait(0.38)
					task.spawn(function()
						local object = dmg.new(player)
						object:SecondType(
							"ground",
							15.5, 
							0.5, 
							rot.CFrame.lookVector * 40, 
							"rbxassetid://6978814463",
							leftleg,
							CFrame.new(0,0,0),
							Vector3.new(3, 4, 3),
							"strong"
						)
					end)
					task.wait(0.22)
					human.AutoRotate = true
					human.JumpPower = 50
					human.WalkSpeed = 16
					coldowns.CooldownGuiSpec(player, 10, "Base_1")
					chr:SetAttribute("activu", false)
					task.wait(10)
					table.remove(cooldowns, table.find(cooldowns, player.Name.. "kickcd"))
				end
			end;
			["PunchDown"] = function()
				if chr:GetAttribute("activu") == true then
					return 
				end
				if table.find(cooldowns, player.Name.. "punchcd") then
					
				elseif not table.find(cooldowns, player.Name.. "punchcd") then
					table.insert(cooldowns, player.Name.. "punchcd")
					chr:SetAttribute("activu", true)
					punchsfx:Play()
					human.JumpPower = 0
					human.WalkSpeed = 2
					local anim = human:LoadAnimation(spec.DownPunch)
					anim:Play(0.1, 1, 1)
					indicators.indicators(player,"yellow", 1)
					human.AutoRotate = false
					wait(0.31)
					task.spawn(function()
						local object = dmg.new(player)
						object:SecondType(
							"none",
							35, 
							0.5, 
							rot.CFrame.lookVector * 5, 
							"rbxassetid://9207578492",
							leftarm,
							CFrame.new(0,-2,0),
							Vector3.new(4, 6, 4),
							"normal"
						)
					end)
					wait(0.13)
					human.AutoRotate = true
					human.JumpPower = 50
					human.WalkSpeed = 16
					coldowns.CooldownGuiSpec(player, 15, "Base_2")
					chr:SetAttribute("activu", false)
					task.wait(15)
					table.remove(cooldowns, table.find(cooldowns, player.Name.. "punchcd"))
				end
			end;
			["HeadPunch"] = function()
				if player.Character:GetAttribute("headcd") then
					if os.time() - player.Character:GetAttribute("headcd") >= 1 then
						player.Character:SetAttribute("headcd",nil)
					else
						return
					end
				end
				if chr:GetAttribute("activu") == true then
					return 
				end
				chr:SetAttribute("activu", true)
				punchsfx:Play()
				local anim = human:LoadAnimation(spec.headbreak)
				anim:Play(0.1, 1, 1)
				indicators.indicators(player,"Red", 1)
				wait(0.5)
				task.spawn(function()
					local object = dmg.new(player)
					object:FourthType(
						"air",
						30.5, 
						0.5, 
						rot.CFrame.lookVector * 40, 
						"rbxassetid://9207578492",
						head,
						CFrame.new(0,0,0),
						Vector3.new(5, 5, 5),
						"strong"
					)
				end)
				wait(0.65)
				player.Character:SetAttribute("headcd", os.time())
				coldowns.CooldownGuiSpec(player, 1, "Base_3")
				chr:SetAttribute("activu", false)
			end;
		};
	}

	setmetatable(newmodule, module)

	return newmodule
end

function module:create(name, attack, val)
	self[name][attack](val)
end

return module

So let me get this right, the module you’re requiring is the one that fires the event…

as that’s what I see. If you’re requiring a module locally it probably won’t work. I suggest using bindable functions/events

emh, no?, this module script is other one that have just other functions, movesets and stuff from skills

1 Like

What is firing the event on the server. As Right now you showed me the event’s function, the module it requires, but what actually fires the event in the first place. Please explain this as I have no clue what this is doing

1 Like

my coding is very spagetti like to explain, so ima just ehhhhhhhhhhhhhhhhhhhhhhhhhh.

this is a module script of a skill (still server side):

local module = {}

local mol = require(game.ServerScriptService.Main.damages.MoveSet)-- this is the module script that fires the remote event that is some how doesnt work

module.Moves = {
	["E"] = function(player, character, press)
		local myNewModule = mol.new(player)
		myNewModule:create("Standless", "Attack", press)
	end;
}

return module

bindable event for a remote event for the input (a local script insde backpack of the player)

script.Parent.Event:Connect(function(mod, key, ...)
	if mod then
		require(mod).Moves[key](...)
	end
end)

the fire event that fires the bindable event:

local event1 = game.ServerScriptService.Main.damages.Event

local abilityss, spec = require(game.ServerScriptService.Main["data stuff"].Standlist), require(game.ServerScriptService.Main["data stuff"].SpecStuff.SpecList)

script.Parent.Remotes.Move_Spec.OnServerEvent:Connect(function(Player, Keycode, press)
	local abilitycode = Player:WaitForChild("Data").Stand
	local Speccode = Player:WaitForChild("Data").Spec
	for ind, val in pairs(spec) do
		if Speccode.Value == ind then
			local clone = game.ServerStorage.SpecScripts:FindFirstChild(val)
			if clone then
				event1:Fire(clone, Keycode, Player, Player.Character, press)-- the bindable event
			end
		end
	end
end)
script.Parent.Remotes.Move_Ability.OnServerEvent:Connect(function(Player, Keycode, press)
	local abilitycode = Player:WaitForChild("Data").Stand
	local Speccode = Player:WaitForChild("Data").Spec
	for ind, val in pairs(abilityss) do
		if abilitycode.Value == ind then
			local clone = game.ServerStorage.StandScripts:FindFirstChild(val)
			if clone then
				event1:Fire(clone, Keycode, Player, Player.Character, press)-- the bindable event
			end
		end
	end
end)
1 Like

can i just let you join on the place and see whats up?

1 Like

and tecnecly, the player is fully correct

1 Like

i just solved, i need it to place in other place thanks to this replay on a post i saw:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.