Some problems with Remote Event

Hello everybody!
I’ll try explaining this as best as i can, so basically, i’m trying to make it so when you click the UI button it removes the shadows and turns materials to smooth plastic.
My script works perfectly as i use a Remove event that (I have already tested it out), only affect the local player and not the server,but the problem is that even though it works perfectly, the output sends this error:
Captura de pantalla (51)

These are my scripts:
Local Script

local Remote = game.ReplicatedStorage.Remotes.Performance
local lowBtn = game.Players.LocalPlayer.PlayerGui.QualitySelect.BaseFrame.LowEnd.Frame.Folder.LowAccept
lowBtn.MouseButton1Up:Connect(function(player)

	Remote:FireServer(player)
	local function Testy(player)
		local Lighthing = game:GetService("Lighting")
		Lighthing.GlobalShadows = false
		for i,v in pairs(game.Workspace.Folder:GetChildren()) do
			v.Material = Enum.Material.SmoothPlastic
		end
	end
	
	Remote.OnClientEvent:Connect(Testy())
end)

Script:

local Remote = game:GetService("ReplicatedStorage").Remotes.Performance

local function Test(player)
	Remote:FireClient(player)
end
Remote.OnServerEvent:Connect(Test)
	

Can someone help me understand what’s causing the output to say that?
Also sorry if it’s something obvious, i’m just learning how to use remote events.

A couple things:

  1. MouseButton1Up1 doesn’t pass the player in its parameters, it passes the x and y coordinates of the mouse (see documentation)
  2. Firing the server automatically inserts the player that fired it into the first parameter received by OnServerEvent. You don’t need to pass it yourself.
  3. Here’s the real issue: Remote.OnClientEvent:Connect(Testy()) is connecting to the result of a function call to Testy(). That is, you’re actually calling Testy() and connecting to the return value of it, but since Testy() doesn’t return anything, it defaults to nil. Therefore, you’re effectively doing :Connect(nil), which is causing your error. To remedy this, just remove the () after Testy() such that it reads :Connect(Testy). This way, you’re passing a reference to the function rather than calling the function.

Thanks for the help man.
I’ll also see that documentation, you’re epic.