Expected <eof>, got 'function'

Hello

  1. What do you want to achieve? Fixing this bug

  2. What is the issue? I do not know what to do in this case, ends wont help

  3. What solutions have you tried so far? I tried asking someone but they didnt reply

---stuff
return module


function module.ChooseCharacter() -- function is the error
	local AvailableCharacters = {}
	for i, v in pairs(game.ReplicatedStorage.AvailableCharacters:GetChildren()) do
		table.insert(AvailableCharacters, v.Name)
---more stuff

if you could help, it would be nice
thanks for reading

You’re putting your code AFTER the return. Put it nested between the return and the module table variable.

3 Likes

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