|
| 28 Dec 2013 11:03 AM |
| If there are set points on a map, how do I make a Gui that when clicked teleports you from the lobby to one of the set points randomly? |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2013 11:08 AM |
Put the parts in a model.
script.Parent.MouseButton1Up:connect(function(player) points = map.Points:GetChildren() player.Character.Torso.CFrame = points[math.random(1,#points)] end) |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2013 11:09 AM |
| Where would the script be put in? |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 28 Dec 2013 11:10 AM |
gui = script.Parent player = script.Parent.....Character
points = { Vector3.new(0,0,0), Vector3.new(0,0,0), Vector3.new(0,0,0), Vector3.new(0,0,0)
}
gui.MouseButtonDown1:connect(function() local m = math.random(1,#points) player:MoveTo(points[m]) end)
Changing the variables to match your studio, that should work fine |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2013 11:16 AM |
The script I posted shops go in the button.
You have to change the path to the model with the parts that you want a player to be teleported too.
Mine is much better than Rofl's. |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 28 Dec 2013 12:00 PM |
@smiley5991
The MouseButtonDown1 event does not return the player who clicked it, rendering your script broken. So guess again you cur! |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2013 12:46 PM |
Not the hard to fix:
script.Parent.MouseButton1Up:connect(function() points = workspace.map.Points:GetChildren() script.Parent.Parent.Parent.Character.Torso.CFrame = points[math.random(1,#points)] end)
guess again kid |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 28 Dec 2013 12:58 PM |
Have I done something to offend you? haha
Your script tries to set the Torsos CFrame to a Vector3, so it's still broken! ooh! |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2013 12:58 PM |
"So guess again you cur!" I think this is an insult? |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 28 Dec 2013 01:00 PM |
| woosh. sorry for using sarcasm. |
|
|
| Report Abuse |
|
|
|
| 28 Dec 2013 01:03 PM |
Stop acting like 5 yr olds..he wants an answer..not to be a babysitter..OWNED Now stop |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
| |
|