-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
Description
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)