RemoteFunction Nil on Return

For some reason, it keeps printing “reward” as nil, despite the fact that it isn’t nil (I’ve tested)
Output: nil, true

Local script

local Data = game.Players.LocalPlayer:FindFirstChild("Data_Folder")
local cooldown = false


script.Parent.MouseButton1Click:Connect(function()
if cooldown == false then
	cooldown = true
	
	script.Parent.click:Play()

	local success, reward = game.ReplicatedStorage.Events.CrateBuy:InvokeServer('Normal')
	
	if success == true then
			print(reward, success)
			print(tostring(reward))
		script.Parent["Cash sound"]:Play()
		cooldown = false
	else
		script.Parent.error:Play()
		script.Parent.Text = 'Insufficient'
		wait(1)
		script.Parent.Text = 'Buy'
		cooldown = false
		end
 	end
end)

Server Script

game.ReplicatedStorage.Events.CrateBuy.OnServerInvoke = function(player, data)
	if data == 'Normal' then
		local Data = player:FindFirstChild("Data_Folder")
		if Data.Coins.Value >= 25 then -- price of Gold/Mormal Crates
			print('Bought Crate')
			Data.Coins.Value = Data.Coins.Value - 25
			
			local gotResult = NormalDryer()
			print(gotResult) -- prints a string, I've checked
			return true, gotResult
		else
			return false
		end
	end	
end

Solved it! Just had to use tostring

Remember to mark your own post as the solution, in future, try and include all of the necessary details pertaining to your error/issue.

local gotResult = NormalDryer()
print(gotResult) -- prints a string, I've checked
return true, gotResult

This was the source of the error/issue but the definition of the function named “NormalDryer” was unshared so we had no idea how/what it was returning.