Hello, one of my friends needs help making a grid thing can anyone help.

he is the code

local Prt = true
local waittime = 1
local Tool = script.Parent.Parent

Tool.Activated:Connect(function(mouse)
    if Prt == true then
        Prt = false        
        local Part = Instance.new('Part')
        Part.Parent = game.Workspace
        Part.TopSurface = 'Smooth'
        Part.BottomSurface = 'Smooth'
            Part.Shape = 'Block'
            Part.Size = Vector3.new(2,2,2)
            Part.Anchored = false
            Part.Position = Vector3.new(math.floor(mouse.Hit.X),math.floor(mouse.Hit.Y),math.floor(mouse.Hit.Z)) -- Where the mouse is pointing
            wait(waittime)
            Part.Anchored = true
            Prt = true
        end
    end)

2 comments

0

What's the problem?

0

What's the problem?