And i made it produce blocks using instance.new
My problem is, I don’t know how to prevent it from dropping blocks from an invisible dropper. I want it to only start dropping when the proximity prompt is triggered.
sorry for og upload**
local Drop = game.Workspace["Part 4"]
local proxy = game.Workspace.proxy.ProximityPrompt -- PROXIMITY PROMPT VARIABLE NOT USED
function MakeBlock()
local Block = Instance.new("Part", game.Workspace)
Block.CFrame = Drop.CFrame
Block.Size = Vector3.new(2, 1, 2)
Block.Material = Enum.Material.Concrete
Block.BrickColor = BrickColor.new("White")
game.Debris:AddItem(Block, 5)
end
while true do
wait(1.5)
MakeBlock()
end
I tweaked the code a bit. I don’t recommend using this method for multiple droppers, but instead insert each dropper inside a table and run the function for each dropper that has been triggered.
--// Variables
local Dropper = game.Workspace["Part 4"]
local ProximityPrompt = game.Workspace.proxy.ProximityPrompt
local Triggered = false
ProximityPrompt.Triggered:Connect(function()
Triggered = true
end)
local function MakeBlock()
local Block = Instance.new("Part")
Block.Parent = workspace
Block.CFrame = Dropper.CFrame
Block.Size = Vector3.new(2, 1, 2)
Block.Material = Enum.Material.Concrete
Block.BrickColor = BrickColor.new("White")
game.Debris:AddItem(Block, 5)
end
while true do
if Triggered then
task.wait(1.5)
MakeBlock()
end
task.wait()
end