script.Parent.Touched:connect(function(hit) if hit.Planks and hit.Name == "Log" then planks = hit.Planks.Value for i = 1, tonumber(planks) do part = Instance.new("Part") part.Position = Vector3.new(hit.Position) part.Size = Vector3.new(1, 9.6, 0.2) hit:Remove() end end end)
I'm clueless one why it won't work.
Planks is an intvalue in Log
The problem you are having is that you are not assigning the part's parent. Do you want it in the Workspace, Lighting, etc? There are two ways to assign the parent of it,
part = Instance.new("Part", Workspace),
part = Instance.new("Part") part.Parent = Workspace