Error in wire system

Its not working in server-sided script:

local wire = game.ReplicatedStorage:WaitForChild("Wire")

game.ReplicatedStorage.PlaceWireEvent.OnServerEvent:Connect(function(plr,tablereceieved)
    print("lol")
    local clone = game.ReplicatedStorage.Wire:Clone()
    clone.Parent = workspace
    clone.Size = clone.CFrame.LookVector*(tablereceieved["StartingPosition"] - tablereceieved["EndingPosition"]).magnitude + clone.CFrame.RightVector*0.5 + clone.CFrame.UpVector*0.5
    clone.CFrame = CFrame.lookAt(tablereceieved["StartingPosition"],tablereceieved["EndingPosition"])
end)

Local script:

mouse.Button1Down:Connect(function()
    if currentpos == Vector3.new(0,0,0) then
        currentpos = selection.Position
        local part = Instance.new("Part",workspace)
        part.Shape = selection.Shape
        part.Position = selection.Position
        part.Size = selection.Size
        part.BrickColor = selection.BrickColor
        part.CanCollide = false
        part.Anchored = true
    elseif currentpos ~= Vector3.new(0,0,0) then
        local tabletosend = {
            ["StartingPosition"] = currentpos,
            ["EndingPosition"] = selection.Position
        }
        game.ReplicatedStorage.PlaceWireEvent:FireServer(tabletosend)
        wait(0.25)
        currentpos = Vector3.new(0,0,0)
    end
end)

What it does is, get two points, make a wire between them :wink:

Can you let us know what the error is?

the wire size is 0.0001, 0.0001,0.0001

Well your way of calculating the size looks a bit weird. You can simply calculate it with

Vector3.new(wireWidth, wireHeight, (startPos-endPos).Magnitude)