Skip to content

Sending data when player joins causes an error #22

Description

@birds3345

When you send data immediately after a player joins, an error is produced: ReplicatedStorage.ByteNet.process.bufferWriter:148: attempt to index nil with 'size'

The code used:

local ByteNet = require(game.ReplicatedStorage.ByteNet)

local packets = ByteNet.defineNamespace("a", function()
	return {
		Test = ByteNet.definePacket({
			value = ByteNet.bool;
		});
	}
end)

game.Players.PlayerAdded:Connect(function(player: Player)
	packets.Test.sendTo(true, player)
end)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions