Hello! So to start I have a code in a local script and a script in ServerScriptService.
The local script is supposed to transfer the given data “player, Blocking” through the RemoteEvent using game.ReplicatedStorage.BlockingChanged:FireServer(player, Blocking). Though this is having some issues as when the server side picks it up it receives the data as the player, “player, player” is the output of my print so it is receiving the argument as “player, player” when it was sent as “player, Blocking.” This is the local script:
local player = game.Players.LocalPlayer
local Blocking = false
script.Parent.MouseButton1Click:Connect(function()
if Blocking == false then
Blocking = true
print(Blocking)
game.ReplicatedStorage.BlockingChanged:FireServer(player, Blocking)
else
Blocking = false
print(Blocking)
game.ReplicatedStorage.BlockingChanged:FireServer(player, Blocking)
end
end)
and this is the server script:
game.ReplicatedStorage.BlockingChanged.OnServerEvent:Connect(function(player, Blocking)
print(player, Blocking)
end)
Sorry for my bad formatting…