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: Need help with this script

Previous Thread :: Next Thread 
Unresolved is not online. Unresolved
Joined: 14 May 2011
Total Posts: 13530
30 Dec 2015 09:56 PM
elseif keyvals["end"] then
for i, player in pairs(game.Players:GetPlayers()) do
player.Character.Torso.CFrame = CFrame.new(math.random(232.3, 320.3), 196.5, math.random(185.9, 214.7))
end


Lets say I wanted to change those locations.

How do I find out the coordinates of the place that the certain brick is that I want it to send the players too?
Report Abuse
Unresolved is not online. Unresolved
Joined: 14 May 2011
Total Posts: 13530
30 Dec 2015 09:57 PM
halp
Report Abuse
FlyNormal is not online. FlyNormal
Joined: 30 Sep 2015
Total Posts: 344
30 Dec 2015 09:58 PM
player.Character.Torso.CFrame = brick.CFrame + CFrame.new(0, 5, 0)

Will teleport the player to brick's CFrame and 5 studs above (so the player does not go inside the brick)
Report Abuse
Unresolved is not online. Unresolved
Joined: 14 May 2011
Total Posts: 13530
30 Dec 2015 10:00 PM
So I just go grad the absolute location of the brick and it will send them there correct? And if I'm going to more than one location (I want to send them to four separate corners) I just separate the locations with commas?
Report Abuse
Unresolved is not online. Unresolved
Joined: 14 May 2011
Total Posts: 13530
30 Dec 2015 10:03 PM
I must be confused as to where I find the bricks location.

Since everytime I replace the 0's with what I think is the location it is breaking altogether
Report Abuse
Unresolved is not online. Unresolved
Joined: 14 May 2011
Total Posts: 13530
30 Dec 2015 10:04 PM
b1
Report Abuse
Unresolved is not online. Unresolved
Joined: 14 May 2011
Total Posts: 13530
30 Dec 2015 10:06 PM
b2
Report Abuse
FlyNormal is not online. FlyNormal
Joined: 30 Sep 2015
Total Posts: 344
30 Dec 2015 10:14 PM
Fixed one:

player.Character.Torso.CFrame = brick.CFrame * CFrame.new(0, 5, 0)

You don't need to know the brick's actual position numbers, this act as a variable that already has the brick's position and directly uses it.

Report Abuse
Unresolved is not online. Unresolved
Joined: 14 May 2011
Total Posts: 13530
30 Dec 2015 10:15 PM
How does it know what brick I'm talking about though?
Report Abuse
Unresolved is not online. Unresolved
Joined: 14 May 2011
Total Posts: 13530
30 Dec 2015 10:16 PM
?
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