Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What argument is missing? A filtering enabled script communicating with the module is not working?

This is the error I am getting:

21:03:55.950 - Argument 1 missing or nil

21:03:55.951 - Stack Begin

21:03:55.951 - Script 'ReplicatedStorage.modules.touch', Line 38 - field enemyCheck

21:03:55.951 - Script 'ServerScriptService.GodServerSkills.HadesServer', Line 109

21:03:55.951 - Stack End

These are lines 37-43 of "enemyCheck". Line 38 is the whole if statement (sorry i know it looks weird with this format)

function module.enemyCheck(char, enemy)
	if module.selfCheck(char) == true and char ~= enemy and enemy:FindFirstChild("Humanoid") and not(enemy:FindFirstChild(statusEffects["Immortal"]))then
		return true
	else
		return false
	end
end

These are lines 104- 113 of "HadesServer":

ball.Touched:Connect(function(hit)
	local enemy = hit.Parent
	if hit.Parent then
		print(t[2])
		print(hit.Parent)
		if touch.enemyCheck(char, enemy) == true then
			touch.burn(hit.Parent, false, 1.5, 1)
		end
	end
end)

Please help!

3 comments

0

ok, but i test this code

0

It looks like at line 109 touch.enemyCheck(char, enemy) char is not defined anywhere, what is char supposed to be?, you're also still using hit.Parent despite assigning hit.Parent to enemy

0

sorry i forgot to mention that the whole script is not being posted. char is supposed to be game.Players.LocalPlayer.Character and I got the character from a local script

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.