Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

MoveTo() not working?

Asked by 8 years ago
tree:MoveTo(math.random(-2005,6100),4,math.random(-2005,6100))

Output: 19:45:43.847 - Unable to cast double to Vector3

I heard that doing

tree:MoveTo(Vector3.new(math.random(-2005,6100),4,math.random(-2005,6100)))

might work and I tried it, did not work. Did not give me an error either.

0
Do you have the primary part set for that model? If you don't know what those are, here's a link that'll hopefully explain. ----------> http://wiki.roblox.com/index.php?title=API:Class/Model/PrimaryPart LateralLace 297 — 8y
0
if you tried tree:MoveTo(Vector3.new(math.random(-2005,6100),4,math.random(-2005,6100))) its suppose to work i just tried in my studio and its worked. ScripterGame 145 — 8y
0
except if you have more than 1 tree named the same when you tried to take 1 with the variable and if your code is just this it will work but you'll can not see it cuz its do it to fast. ScripterGame 145 — 8y
0
mmm that's not what the wiki says. Check your sources, specifically where you got this script from? LateralLace 297 — 8y

Answer this question