The problem I’m having is that my RemoteEvent is including every past argument of FireServer when it’s firing to the server again.
Script Example: (I’m posting this instead of the actual script because it would be too much of a hassle to post the entire 400+ lines script so take it with a grain of salt)
--Local
UIS.InputBegan:Connect(function(Input, GPE)
if Input.KeyCode == Enum.KeyCode.E and not GPE then
RemoteEvent:FireServer("a")
end
end)
UIS.InputEnded:Connect(function(Input, GPE)
if Input.KeyCode == Enum.KeyCode.E and not GPE then
RemoteEvent:FireServer("B")
end
end)
--Server
RemoteEvent.OnServerEvent:Connect(function(player, state)
if state == "a" then
print("The state is:" ..state)
elseif state == "b" then
print("The state is:" ..state)
end
end)