Invalid Argument #3 (string expected, got instance)

Hello, I’ve tried changing my script a lot of times and I keep getting the same error: Invalid Argument #3 (string expected, got instance)

Local Script:

local qTech_Folder = game.Workspace:FindFirstChild("qTech || Check-In")
local Events = qTech_Folder.Files.Events


script.Parent.MouseButton1Click:Connect(function()
	
	local msg = script.Parent.Parent.BoardingTime.Text
	
	Events.Update:InvokeServer(msg)
	
end)

Server Script:

local update = script.Parent.Events.Update
function update.OnServerInvoke(msg)
	
	script.Parent.FlightInfo.Boarding.Value = msg
end

Any help would be wonderful!

Use:

local msg = tostring(script.Parent.Parent.BoardingTime.Text)

as it converts it to a string.

2 Likes

Tried that and am still having the same issue:
image

You sure you remembered to pass the player value through the remote?

Yeah I have and It’s still doing it.

Which line are you specifically having issues? We can’t tell.

Events.Update:InvokeServer(msg) and script.Parent.FlightInfo.Boarding.Value = msg

What type of event is it? BindableEvent?

I’m using a Remote Function. (30 Words)

The player automatically passes as the first parameter.
Change to function update.OnServerInvoke(player, msg) instead

4 Likes