Need Help with tonumber()

I’m trying to make a kind of booking system where staff can pick how many Free Spots there are and how many Paid Spots.

I get the error “string expected, got instance”

Client script:

Main.Submit.MouseButton1Click:Connect(function(freeSpots, paidSpots)
	freeSpots = Main.FreeSpots.Text
	paidSpots = Main.PaidSpots.Text
	ReplicatedStorage.Main:FireServer(freeSpots, paidSpots)

Server script:

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local Main = ReplicatedStorage:WaitForChild("Main")

Main.OnServerEvent:Connect(function(freeSpots, paidSpots)
	local mainFrame = workspace.BookingSystem.Screen.SurfaceGui.Main
	local spotsFrame = mainFrame.SpotsFrame
	spotsFrame.FreeSpots.Text = freeSpots
	spotsFrame.PaidSpots.Text = paidSpots

Please do help me figuring out how to fix this.

FireServer implicitly passes the player as the first argument, so you need to account for that as well by adding a parameter for player.

Main.OnServerEvent:Connect(function(player, freeSpots, paidSpots)

Done, but how do I fix the tonumber() thing I know I need it.

Never mind just adding player, helped me fix it thank you so much.