Two errors with this script.
It doesn't change the position of the new parts. And. It doesn't add 1 to the logs cut value.
script.Parent.Touched:connect(function(hit)
if hit.Name == "Log" then
planks = hit.Planks.Value
for i = 1, tonumber(planks) do
part = Instance.new("Part", Workspace)
part.BrickColor = hit.BrickColor
part.FormFactor = "Custom"
part.Size = Vector3.new(hit.Size.X/5 ,hit.Size.Y, hit.Size.Z/2)
part.Rotation = Vector3.new(90, 90, 0)
part.Position = Vector3.new(hit.Position)
part.TopSurface = "Smooth"
part.BottomSurface = "Smooth"
hit:Remove()
end
game.Workspace.LogsCut = game.Workspace.LogsCut + 1
end
end)

1 comment
Fixed 2nd error with a tonumber(--code)