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

roblox typechecking question marks meaning?

you can put questionmarks by types:

function foo (number: number | string? --[[<-- this]])
	local number = tonumber(number)

	return number * 2
end

what do they do?

1 answer

✓ Accepted answer

optional. can be nil or whatever else.

1 comment

0

so that's how you make optional variables??? thanks!

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