I know how to change a part's position based on another part's position, but I can't figure out how to check if a part is, say, three units above another one. Can anyone point me in the right direction?
EDIT: Tried this, didn't work.
Error: Workspace.number.Script:3: attempt to call field 'Position' (a userdata value)
function checkmine()
local mine = game.Workspace:FindFirstChild("mine")
if mine.Position == script.Parent.Position + script.Parent.Position(4,0,0) then
game.ReplicatedStorage:FindFirstChild("1"):Clone().Parent = script.Parent
end
end
script.Parent.ClickDetector.MouseClick:connect(checkmine)

2 comments
You mean like magnitude?
Yes