ByteNet
ByteNet copied to clipboard
CFrames sent to Serverdoesn't seems to be accurate
More info soon:
-- LocalScript in a tool
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ToolNetwork = require(ReplicatedStorage.ToolNetwork)
script.Parent.Activated:Connect(function()
ToolNetwork.Activate.send({
direction = workspace.CurrentCamera.CFrame
})
end)
-- definitions
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local b = require(ReplicatedStorage.Melody.Modules.ByteNet)
local packet = b.definePacket
return b.defineNamespace("Tools", function()
return {
Activate = packet({
value = b.struct({
direction = b.cframe
}),
})
}
end)
-- On server
ToolNetwork.Activate.listen(function(data, player)
-- insert code to place parts here
end)
Creating a new part and CFraming is like this:
Printing the data going to be sent to server and printing the data the server received does this result in the Output:
For those encountering, according to ffrostfall updating to v0.4.5 should fix
wait do we need to update back?
like do we need to revert back to 0.4.5?
still broken
any updates?