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: Move a model to a random position?

Previous Thread :: Next Thread 
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
02 Sep 2013 11:51 AM
I have a egg inside a model..
how do i move the egg randomly every once and 10-15 seconds
I know how to do that 10-15 seconds, just not really how to exactly move it?
A bodyposition?
It should move at like twice times the speed of a normal robloxian
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
02 Sep 2013 12:00 PM
bump
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
02 Sep 2013 12:09 PM
bump
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
02 Sep 2013 12:09 PM
MODELNAME = game.Workspace.MODELNAME
Egg = MODELNAME.Egg


wait(math.random(10,11,12,13,14,15))
Egg:remove()
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
02 Sep 2013 12:10 PM
OOOH Move the egg, Not remove the egg. Dont look at me. Im ashamed
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
02 Sep 2013 12:10 PM
Just put some bricks down and have it randomly move to those bricks
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
02 Sep 2013 12:13 PM
lol you dont know how to use math.random
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
02 Sep 2013 12:13 PM
OOOH, You dont want it to teleport. Yes you would do BodyPosition
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
02 Sep 2013 12:14 PM
Hey buddy >.>, I tested it and it printed hi
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
02 Sep 2013 12:16 PM
math.random(minnumber, maxnumber) --between those numbers
math.random(minnumber) --randomly that number or above
math.random() --random number
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
02 Sep 2013 12:41 PM
I got my code, the bodyposition is made but doesnt move
while wait() do
    time = math.random(20,25)
    b=Instance.new("BodyPosition", script.Parent)
    b.maxForce = Vector3.new(math.random(250,350), math.random(250,350),math.random(250,350))
    b.position = Vector3.new(math.random(5,25),math.random(40,65),math.random(5,25))
    wait(time/2)
    b:remove()
    wait(time/2)
    end
no errors, it just doesnt move it.
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
02 Sep 2013 01:01 PM
Did you try setting it to wumbo?
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
03 Sep 2013 01:57 PM
wumbo?
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
03 Sep 2013 02:11 PM
bump
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
03 Sep 2013 02:24 PM
b50
Report Abuse
Ri1es is not online. Ri1es
Joined: 19 Mar 2011
Total Posts: 108
03 Sep 2013 02:28 PM
Does the egg contain a humanoid?
-Ri1es
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
03 Sep 2013 02:31 PM
No, why?
Shall I add one?
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
03 Sep 2013 02:34 PM
Really no one else can help?


Add more force to the bodyposition.
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
03 Sep 2013 02:38 PM
Can you fix it....
not just tell me?
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
03 Sep 2013 02:46 PM
maxSpeed = 50000


while wait() do
time = math.random(20,25)
b=Instance.new("BodyPosition", script.Parent)
b.maxForce = Vector3.new(math.random(maxSpeed/2,maxSpeed), math.random(maxSpeed/2,maxSpeed),math.random(maxSpeed/2,maxSpeed))
b.position = Vector3.new(math.random(5,25),math.random(40,65),math.random(5,25))
wait(time/2)
b:remove()
wait(time/2)
end
Report Abuse
Ri1es is not online. Ri1es
Joined: 19 Mar 2011
Total Posts: 108
03 Sep 2013 02:46 PM
You could try creating a CFrame tweening function.

-Ri1es
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
03 Sep 2013 03:04 PM
You mean like lerp?
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
03 Sep 2013 03:08 PM
look wat happens; http://www.roblox.com/ForumStuffForPeeps-place?id=125722166
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
03 Sep 2013 03:14 PM
Works fine. Just set cancollide to false.
Report Abuse
Soquick is not online. Soquick
Joined: 01 Nov 2012
Total Posts: 1497
03 Sep 2013 03:15 PM
It would go through baseplate?
I just want it to roll to a random spot
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