I'm trying to move a part to one of two locations. The location is randomly selected from a list of locations in an array. I'm using the code below, but it's not working. Is there anything I should change?
function onClicked(playerWhoClicked)
local myArray = {"CFrame.new(0, 50, 0)", "CFrame.new(0, 25, 0)"}
script.Parent.CFrame = CFrame.new(math.random(1, #myArray))
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Any help is greatly appreciated.
