:InvokeServer() | attempt to concatenate string with Instance

Hello Developers!
i’ve been brain storming to think how to fix this but unfortunately, i can’t. i separate the parameters and the function to know which line of it was causing the problem but it said
image. This is the problem. the error is actually here
image. I’ve asked my friends how to fix it but they can’t solve it either so i have to try DevForum. I’ve thinking that this might be just a bug because I’m not concating any in line 66, there’s No string, No instance. just a function in line 66. (i have no report bug perms)

Thanks for helping me out, i appreciate it!

Judging by your code and the error, I’m assuming that you didn’t properly set up the server side method reception?

RemoteFunction.OnServerInvoke = function(player, ...)
  --the player who invoked the event is passed automatically as the first argument
  --all the arguments you sent are passed after it
end

When you invoke a RemoteFunction the code on the other side of replication automatically runs

image
i already did the server side method.

There may be issue with the moderate:__newRoom method, which is the last thing I can assume. (unless this is the method that invokes the server)

Side note

You can just pass ..., you don’t have to make a table for it (unless your method is set up in a specific way that requires that)

I really can’t help very much unless I see the all of the relevant code

What are the lines under it? The error might get reported on line 66 even if the source of the issue is one of the parameters.

this is the module of server:__newRoom

image
this is the whole client script

raw
-- ### Create Room
script.Parent.Confirm.MouseButton1Click:Connect(function()
	warn(game.ReplicatedStorage.create_SECURE____
		["Secure: The Wall"]
		["Server(23uufgyg213fg---)"]
		.createRoom
		:InvokeServer (
		script.Parent.Title.Text
		,Visibility
		,Timer
		,Players
		,Round)
	)
end)

chrome_oDhiyrvmuR

This is probably why. I’m assuming requestingPlayer is the actual player instance and not their name.

You can’t concatenate (combine) a string with an instance, hence the error message.

requesting player is a textbox input. Not sure what the other element is though, this code is really hard to diagnose in snippets like this.

1 Like

Thank you so much! i didn’t notice the whole time it was the module error, i thought its just the client but thank you though!

1 Like