generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Doesnt work

Previous Thread :: Next Thread 
wubbzy301 is not online. wubbzy301
Joined: 15 May 2010
Total Posts: 1188
02 Apr 2014 06:31 PM
Code:

x = 225 -- First line
z = 225
tableparts = game.Lighting.CityParts:GetChildren()
light = game.Lighting
numran = 0

function MakeCity()
terrain = light.Terrain:Clone()
terrain.Parent = game.Workspace
terrain:MoveTo(x,false,z) ------------- This errors
numran = math.random(1,2)
if numran == 1 then
part = tableparts[math.random(1,#tableparts)]
if part:IsA("Model") then
part.Parent = game.Workspace
part:MoveTo(x,false,z)
elseif part:IsA("BasePart") then
part.Parent = game.Workspace
part.Position = Vector3.new(x,false,z)
end
end
x = x - 50
if x == -275 then
x = 225
z = z - 50
end
end

while z > -225 do
MakeCity()
wait()
end -- Last line


Error:
16:28:07.081 - Unable to cast double to Vector3
16:28:07.082 - Script 'Workspace.Script', Line 10 - global MakeCity
16:28:07.083 - Script 'Workspace.Script', Line 30
16:28:07.084 - stack end



Report Abuse
wubbzy301 is not online. wubbzy301
Joined: 15 May 2010
Total Posts: 1188
02 Apr 2014 06:40 PM
bump
Report Abuse
wubbzy301 is not online. wubbzy301
Joined: 15 May 2010
Total Posts: 1188
02 Apr 2014 06:43 PM
GUYS HELLO??
Report Abuse
wubbzy301 is not online. wubbzy301
Joined: 15 May 2010
Total Posts: 1188
02 Apr 2014 06:47 PM
HI?
Report Abuse
L0cky2013 is not online. L0cky2013
Joined: 30 Jul 2012
Total Posts: 1446
02 Apr 2014 06:48 PM
:MoveTo(x,0,z) You can't have false
Report Abuse
wubbzy301 is not online. wubbzy301
Joined: 15 May 2010
Total Posts: 1188
02 Apr 2014 06:55 PM
can't have false? False can stay the axis. If you change to 0, it changes.
Also I solve it...
:MoveTo(Vector3.new(x,false,z)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image