Client:
Mode is Normal
Difficulty is Easy
local RS = game:WaitForChild("ReplicatedStorage") local EV = game.ReplicatedStorage:WaitForChild("ServerEventHandeler") local SC = game.ReplicatedStorage.ServerEventHandeler:WaitForChild("ServerCreation") local LP = game.Players.LocalPlayer local Dif = game.ReplicatedStorage.Settings.Difficulty.Value local Modee = game.ReplicatedStorage.Settings.Mode.Value script.Parent.MouseButton1Click:Connect(function() print("SC Waiting") SC:FireServer(LP ,Dif ,Modee) print("SC Fired") end)
Server
local function lobby(LP ,Dif ,Modee) print("LP is", LP.Name) print("Dif", Dif) print("Mode", Modee) end local SC = game.ReplicatedStorage.ServerEventHandeler:WaitForChild("ServerCreation") SC.OnServerEvent:Connect(lobby)
The output is
LP is tommymcoco1
Dif tommymcoco1
Mode Easy
Remote functions automatically pass the player who invoked the function as first parameter.
local function lobby(LP,Dif ,Modee) print("\"LP\" is", LP) print("Dif", Dif) print("Mode", Modee) end
And for the client you just don't pass it:
SC:FireServer(Dif ,Modee)
In your case the LP
parameter was player passed by the remote function, Dif
was player passed by you and Mode
was Dif
parameter passed by you on client, the fourth parameter was the actual Modee
but it got ignored.