Strict typechecking warning

Trying to write a module with --!strict and I get this warning. What does it mean?
image

type Tag = string
function module:AddCD(Child:Instance?,CDID:string?, defaultremove:boolean?, timer:number?):Tag?
	AddTag(Child, CDID)
	if defaultremove then
		task.delay(timer,function()
			RemoveTag(Child, CDID)
		end)
	end
end

Changing the type of tag to type Tag = RBXScriptConnection still gives off same warning since that’s what the function does.

1 Like

Its Because of this:

for me it says: not all codepaths in this function returns "string?".
So from my understanding, It means that you are saying it returns something, but it does not.
Could be wrong tho.

1 Like

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