|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
| |
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
| |
|
| |
|
|
| 13 Apr 2014 09:28 AM |
No. i simply did what u asked. And it doesnt work.
|
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|