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 » Scripting Helpers
Home Search
 

Re: How?

Previous Thread :: Next Thread 
TrollHappy is not online. TrollHappy
Joined: 05 Nov 2010
Total Posts: 112
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
TrollHappy is not online. TrollHappy
Joined: 05 Nov 2010
Total Posts: 112
24 Aug 2011 07:50 PM
Spawn location, i mean
Report Abuse
miz656 is not online. 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 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
24 Aug 2011 07:51 PM
Spawn location XD
Report Abuse
TrollHappy is not online. TrollHappy
Joined: 05 Nov 2010
Total Posts: 112
24 Aug 2011 07:52 PM
That will probably only run once..
Report Abuse
TrollHappy is not online. TrollHappy
Joined: 05 Nov 2010
Total Posts: 112
24 Aug 2011 07:55 PM
No one? I guess a loop is my last resort..
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
24 Aug 2011 07:56 PM
Not if you have an if then statement.
Report Abuse
TrollHappy is not online. TrollHappy
Joined: 05 Nov 2010
Total Posts: 112
24 Aug 2011 07:59 PM
Example?
Report Abuse
MrNicNac is not online. 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 is not online. 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 is not online. 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
TrollHappy is not online. TrollHappy
Joined: 05 Nov 2010
Total Posts: 112
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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