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)
end)
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
end)
Please do help me figuring out how to fix this.