My script is supposed to spawn a new part 15 studs above a part named "trigger" in the model "mine"
When I click the button that the script is in, nothing happens. No errors. What is wrong?
function dropbrick()
local brick = Instance.new("Part")
brick.Position = game.Workspace:FindFirstChild("mine").trigger.Position + Vector3.new(0,15,0)
end
script.Parent.ClickDetector.MouseClick:connect(dropbrick)

2 comments
You need to parent it to the workspace
Wow, I didn't realize I didn't put that, thanks haha! +1