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: Hi! I need help...

Previous Thread :: Next Thread 
henryrexdog is not online. henryrexdog
Joined: 16 Jul 2011
Total Posts: 28
13 Apr 2014 09:05 AM
I made a gui, and it teleports to the same spot everytime i click it. Can you help me and make it teleport to random spots? Thanks!
Report Abuse
youssef04 is not online. youssef04
Joined: 22 Jan 2011
Total Posts: 1745
13 Apr 2014 09:06 AM
Post script, we'll modify. AND ALL IS DONE :D
Report Abuse
henryrexdog is not online. henryrexdog
Joined: 16 Jul 2011
Total Posts: 28
13 Apr 2014 09:07 AM
function Click()
script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(0.0, 0.0, 0.0)end --The postition of thr brick.

script.Parent.MouseButton1Down:connect(Click)
Report Abuse
youssef04 is not online. youssef04
Joined: 22 Jan 2011
Total Posts: 1745
13 Apr 2014 09:07 AM
Where the position is:
(math.random, math.random, math.random)
Instead of position, put that, it will put random numbers and that teleports you to random places
Report Abuse
HeavenlyRobloxrox3 is not online. HeavenlyRobloxrox3
Joined: 02 May 2012
Total Posts: 101
13 Apr 2014 09:07 AM
put a script inside of the gui:

script.Parent.MouseButton1Down:connect(function()
randx = math.random(range, range)
randy = math.random(range, range)
randz = math.random(range, range)
script.Parent(etc until you get to the player...).Character:MoveTo(Vector3.new(newrandx, randy, randz))
end)
Report Abuse
henryrexdog is not online. henryrexdog
Joined: 16 Jul 2011
Total Posts: 28
13 Apr 2014 09:08 AM
Thank you!
Report Abuse
youssef04 is not online. youssef04
Joined: 22 Jan 2011
Total Posts: 1745
13 Apr 2014 09:08 AM
function Click()
script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new(math.random, math.random, math.random)end

script.Parent.MouseButton1Down:connect(Click)
Report Abuse
henryrexdog is not online. henryrexdog
Joined: 16 Jul 2011
Total Posts: 28
13 Apr 2014 09:12 AM
When i did what you told me to do. It teleport in the same spot. but i will see if i can fix it.
Report Abuse
youssef04 is not online. youssef04
Joined: 22 Jan 2011
Total Posts: 1745
13 Apr 2014 09:18 AM
Is there a script that you didn't make?
Because there are some scripts that anchor the torso.
Try my one, it may work.
Report Abuse
henryrexdog is not online. henryrexdog
Joined: 16 Jul 2011
Total Posts: 28
13 Apr 2014 09:23 AM
Ok.
Report Abuse
HeavenlyRobloxrox3 is not online. HeavenlyRobloxrox3
Joined: 02 May 2012
Total Posts: 101
13 Apr 2014 09:25 AM
Is it working?
Report Abuse
henryrexdog is not online. henryrexdog
Joined: 16 Jul 2011
Total Posts: 28
13 Apr 2014 09:28 AM
No. i simply did what u asked. And it doesnt work.
Report Abuse
youssef04 is not online. youssef04
Joined: 22 Jan 2011
Total Posts: 1745
13 Apr 2014 10:06 AM
Try this table method:

Places = {Vector3.new(math.random, math.random, math.random)}
local Player = script.Parent.Parent.Parent.Parent

function Click()
Player.Character:MoveTo(Places[math.random(1,#Places)])
end

script.Parent.MouseButton1Down:connect(Click)
Report Abuse
henryrexdog is not online. henryrexdog
Joined: 16 Jul 2011
Total Posts: 28
18 Apr 2014 07:40 AM
Thank you bro for you guys help. I mess around a little with the scripts. And i got to teleport it.
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