Transferring variables from local script to server script

hello, so i have a local script and i need to The value of SlotOn to SlotF’s name. The problem is the variable, and ive seen something like this before where you get variables from the local script and you can use it in the remote even, i could be wrong but its not working.

Server Script"

script.Parent.SlotOn.OnServerEvent:Connect(function(SlotOn, SlotF)
	SlotOn.Value = SlotF.Name
end)

Local script:

local SlotOn = Selected.Value.SlotOn
local SlotF = Button.SlotF.Value

script.Parent.SlotOn:FireServer(SlotOn, SlotF)

now this isnt my actual entire script obviously because its alot, but i narrowed it down to what i need. So how would this work, becuase i dont have those valriables in the serverscript

1 Like

OnServerEvent has 3 “variables”.

script.Parent.SlotOn.OnServerEvent:Connect(function(Player, SlotOn, SlotF)