hey all, im trying to pass a true/false through a remote event, but on the server side it shows as nil, can anyone help?
client side:
script.Parent.MouseButton1Click:Connect(function(player)
print("button pressed")
if LPlayer.ready.Value == false then
RE.PlayerReady:FireServer(player, true)
elseif LPlayer.ready.Value == true then
RE.PlayerReady:FireServer(player, false)
end
end)
server side:
RE.PlayerReady.OnServerEvent:Connect(function(player, stat)
print("true ", stat)
if stat == true then
print("true")
player.ready.Value = true
RP.Value = RP.Value + 1
local count = 0
for _,v in pairs(game.Players:GetChildren()) do
count = count + 1
end
if RP.Value >= count then
RP.Value = count
end
RE.PlayerReady:FireAllClients(true)
end
end)
thanks for any help !