Getting error: invalid argument #3 (string expected, got Instance)

Hi!
I have looked at other forum posts about this error and can still not figure out why this is not working. I am trying to make an ordering system where it shows the name of the player who ordered.

I am getting the error: Workspace.ConfirmTV.Screen.Script:12: invalid argument #3 (string expected, got Instance).

I am getting this error on line 12, on the Server Script in the order TV, where it says “copy.plrname.Text = name”

LOCAL SCRIPT:

local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local NewOrder = ReplicatedStorage:WaitForChild(“NewOrder”)

script.Parent.MouseButton1Click:connect(function()

wait(0.2)
NewOrder:FireServer(script.Parent.Parent.TextBox.Text)
script.Parent.Parent.venuename.Text = “SENDING…”
wait(1.5)
script.Parent.Parent.Parent:Destroy()

end)

SERVER SCRIPT:

local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
local NewOrder = ReplicatedStorage:WaitForChild(“NewOrder”)

function CreateNewOrder(name)

wait(1)

local OrderItem = script.Parent.OrderFolder.Order
local copy = OrderItem:Clone()

copy.Parent = script.Parent.SurfaceGui.Frame.ScrollingFrame

copy.plrname.Text = name

end

NewOrder.OnServerEvent:Connect(CreateNewOrder)

Any help would be so good, tysm.

The first argument of OnServerEvent is always the player who fired the event, so you need to make a parameter for that before your own parameters, you cannot pass it yourself when firing to the server as it automatically given, change

function CreateNewOrder(name)

To

function CreateNewOrder(plr,name)

The function CreateNewOrder should have the parameter Player before name, because RemoteEvents always give the Player parameter.

Edit: facepalm

You must supply a first parameter that contains the player instant that fired the event, because in every OnServerEvent, the first parameter that the function is connected to is always the player instance.