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 » Scripters
Home Search
 

Re: Tree Spawn Position Problems

Previous Thread :: Next Thread 
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
19 Apr 2015 07:48 AM
http://gyazo.com/120f946c3c687391025fe09cb18470ea
always prints 8 as the Y Axis Position :/

local y = Map.Position.Y
local yS = Map.Size.Y / 2
return Vector3.new(math.random(x - xS, xS + x), math.min(yS - y), math.random(z - zS, zS + z)) --focus on y and yS!

region = Region3.new(Vector3.new(pos.X - 4, pos.Y, pos.Z - 4), Vector3.new(pos.X + 4, pos.Y + 12, pos.Z + 4))

t:MoveTo(region.CFrame.p)

"My Life is going Good... but..."
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
19 Apr 2015 07:49 AM
btw,

Spawn Part Position == -1, 0, -10
Spawn Part Size == 198, 0.2, 198

"My Life is going Good... but..."
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
19 Apr 2015 07:52 AM
http://wiki.roblox.com/index.php?title=Math.min#math.min
I'm not sure that is what you think it is.
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
19 Apr 2015 07:54 AM
nope... I will try 0 instead for the Y Axis... I'll see if it Works :/
cos who knows, it might be the CSG Modeler Bugging/Glitching again :/
the thing is though, it didn't do that in Studio!

"My Life is going Good... but..."
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
19 Apr 2015 07:56 AM
so now I did 0 as the Y Axis and now it says 6 as the Y Axis Position...

"My Life is going Good... but..."
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
19 Apr 2015 08:00 AM
... What are you trying to do exactly?
Using MoveTo on the region will position whatever you're moving to the center of the region
If the bottom of the region is 0 and the top is 12 then obviously it'll be position at the center, AKA: 6.
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
19 Apr 2015 08:01 AM
found it...
region.CFrame.p.Y / 2

"My Life is going Good... but..."
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
19 Apr 2015 08:03 AM
thnx for the help lamp :)

"My Life is going Good... but..."
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
19 Apr 2015 08:04 AM
Mmkay.
Not sure why you're using a region for this.
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
19 Apr 2015 08:05 AM
lol... if u check my Game Development Progress u'll know (I think)

"My Life is going Good... but..."
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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