|
| 24 Aug 2011 07:46 PM |
| How do you check if someone is at a particular spawn point, but not with a loop? |
|
|
| Report Abuse |
|
|
| |
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 24 Aug 2011 07:50 PM |
| Just say the Position where the spawn point is and thats where the Player is -_- |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
| |
|
|
| 24 Aug 2011 07:52 PM |
| That will probably only run once.. |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 07:55 PM |
| No one? I guess a loop is my last resort.. |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 24 Aug 2011 07:56 PM |
| Not if you have an if then statement. |
|
|
| Report Abuse |
|
|
| |
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 24 Aug 2011 08:01 PM |
You can't directly check. Use a one-time-run check using the distance between a spawn and the player. If the player is within say...10 studs of a spawn then we will return that spawn.
local spawns = { Workspace.Spawn1; Workspace.Spawn2; }
function GetSpawnFromPlayerPosition(player) for i,v in pairs(spawns) do if (v.Position - player.Character:GetModelCFrame().p).magnitude <= 10 then return v end end end |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 24 Aug 2011 08:02 PM |
game.Workspace.miz656.Humanoid.Health = 50 if game.Workspace.miz656.Humanoid.Health ==50 then game.Workspace.Base.Transparency = 1 end
What that does is First my health is 50, then you use if thens.If my statement was true, which it is then you say what you want. game.Workspace.miz656.Humanoid.Health = 50 is my fact if game.Workspace.miz656.Humanoid.Health ==50 is the statement to make sure its true game.Workspace.Base.Transparency = 1 thats what I wanted And you need an end for the if. |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 24 Aug 2011 08:03 PM |
@mrmicmac
I was gonna get their -___- I would of done it a different way though... |
|
|
| Report Abuse |
|
|
|
| 24 Aug 2011 08:05 PM |
@MrNicNac
Thanks, i'll adjust that script to my likings.
@miz,
I'm not a total idiot.. I already know stuff like that! |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 24 Aug 2011 08:09 PM |
-____-
Then how come you didn't say anything else besides a loop? |
|
|
| Report Abuse |
|
|