I'm trying to make a terrain building tool, and I need help. This script isn't working.
The output says that on Line 10, Argument 6 is missing or nil.
local deb = false print("waht") script.Parent.Equipped:connect(function(mouse) print"lol" mouse.Button1Down:connect(function() print("running") if deb ~= true then deb = true local dacell = Workspace.Terrain:WorldToCellPreferEmpty(Vector3.new(mouse.Hit.p)) local actcell = Workspace.Terrain:SetCell(dacell,Enum.CellMaterial.Cement,Enum.CellOrientation.X) wait(1) deb = false end end) end)
17:23:14.438 - Argument 6 missing or nil 17:23:14.438 - Script 'Players.Player1.Backpack.Tool.LocalScript', Line 10 17:23:14.438 - stack end 17:23:14.439 - Disconnected event because of exception
You missed an argument on line 10, the CellBlock (or 3rd, in your case) argument.
local actcell = Workspace.Terrain:SetCell(dacell,Enum.CellMaterial.Cement,Enum.CellBlock.Solid,Enum.CellOrientation.X)
This information, about the SetCell method, is on the wiki, so try looking there when you get stumpted too!