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: Region3 Forcefields?

Previous Thread :: Next Thread 
sentry3 is not online. sentry3
Joined: 01 May 2010
Total Posts: 538
04 Jun 2016 07:47 PM
How do I find people in this position and give them ff then when they leave remove it? heres the points--

local p1 = (-27.5, 25.7, 54.5)
local p2 = (-76.5, 11.7, -2.5)
local region =(p1,p2)
Report Abuse
sentry3 is not online. sentry3
Joined: 01 May 2010
Total Posts: 538
04 Jun 2016 08:00 PM
bump
Report Abuse
Syntropy is not online. Syntropy
Joined: 16 Mar 2009
Total Posts: 2272
04 Jun 2016 08:03 PM
There's no way to tell if someone left a region so use magnitude.
Report Abuse
sentry3 is not online. sentry3
Joined: 01 May 2010
Total Posts: 538
04 Jun 2016 08:06 PM
well then... how wud i do that
Report Abuse
sentry3 is not online. sentry3
Joined: 01 May 2010
Total Posts: 538
04 Jun 2016 08:15 PM
i did this-
Position1 = Vector3.new(-27.5, 25.7, 54.5)
Position2 = Vector3.new(-76.5, 11.7, -2.5)
print((Position1-Position2).magnitude)

and got this-
76.459136962891

what now?
Report Abuse
Syntropy is not online. Syntropy
Joined: 16 Mar 2009
Total Posts: 2272
05 Jun 2016 08:46 AM
Magnitude is the distance in studs two points are. So you set the magnitude to a brick and a player's torso. Experiment with the distance and find a number you're happy with. Then use an if statement to determine if that player is x amount of space away from the brick then they get a shield.

But if this is just a spawn then use a touch instance.
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