Content added Content deleted
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
<!-- Some information --> |
<!-- Some information --> |
||
The LifeSensor is a part used in programming. It detects life within 2000 studs. Lifesensors are found in all aliens as a way to sense players. In order to use, you must use the LifeSensor:GetReading() function. It will return a dictionary of all the nearby players and their locations, given in Vector3.<b> |
The LifeSensor is a part used in programming. It detects life within 2000 studs. Lifesensors are found in all aliens as a way to sense players. In order to use, you must use the LifeSensor:GetReading() function. It will return a dictionary of all the nearby players and their locations, given in Vector3. It can also return [[Stan]] as a player.<b> |
||
===the script below is an example of a turret that uses a lifesensor.=== |
===the script below is an example of a turret that uses a lifesensor.=== |
||
<syntaxhighlight lang="lua" line="1"> |
<syntaxhighlight lang="lua" line="1"> |
||
local LifeSensor = GetPartFromPort(1, "LifeSensor") --gets the lifesensor instance |
local LifeSensor = GetPartFromPort(1, "LifeSensor") --gets the lifesensor instance |