Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Unable to cast double Vector3 error, How would I fix?

I am trying to make a script that moves rooms along by 25 studs, but I get an unable to cast double vector3 error. Help?

	local clone = rooms[math.random(1, #rooms)]:Clone()
	clone.Parent = workspace
	local cur = val*25
	clone:MoveTo(0, cur, 0)

2 answers

✓ Accepted answer

MoveTo takes a Vector3 value as an argument, rather than three numbers:

clone:MoveTo(Vector3.new(0, cur, 0))

This discussion is preserved as it was. New answers, comments, and votes are closed.