So, I'm a newbie in this script stuff, and I made a few simple things. Currently I'm trying to understand CFrame and trying to make a dropper, but I will talk about the dropper. I'm trying to make a dropper with a few lines which I think it's the necessary. I took a look at a already done script to try understand it, but I'm having a problem with where the part is created(CFrame).
local dropperOre = Instance.new("Part",Workspace) while true do dropperOre.CFrame = CFrame.new(Workspace.Part.Position, Vector3.new(-80, 10, 90)) dropperOre.FormFactor = "Custom" dropperOre.Size = Vector3.new(1,1,1) wait(1) end
Also, tell me if something is wrong or if the entire script is. Sorry if it is ridiculously wrong.
This script actually looks okay. However, there is one thing that would cause this script to malfunction.
Inside the loop, you're changing the position of dropperOre
, a part which gets created outside
the loop. This means you only ever create a single ore to drop, and try to repeatably drop it inside the loop.
Simply place that part inside the loop.
while true do local dropperOre = Instance.new("Part") dropperOre.CFrame = CFrame.new(workspace.Part.Position, Vector3.new(-80, 10, 90)) dropperOre.FormFactor = "Custom" dropperOre.Size = Vector3.new(1,1,1) dropperOre.Parent = workspace wait(1) end
workspace
when trying to access game.Workspace.Also, as the comments say, you're using the CFrame constructor, CFrame.new(position, lookAt)
So make sure you're using the corrent position you want.