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: Values

Previous Thread :: Next Thread 
JoelC2 is not online. JoelC2
Joined: 28 May 2010
Total Posts: 344
30 Aug 2011 03:18 PM
the value of a gui in my game = 0 i want the person who has the gui in their guis to die but idk how to identify the oerson to acsess their humanoid ino that part of the script wud be like this....

---------------
if CurrentValue.Value = 0 then
PERSON.Humanpid.Health = 0
----------------

so idk how to find the exact person to kill :l
kinda bad description but its for a hunger game gui.
Any help?
Report Abuse
UFAIL2 is not online. UFAIL2
Joined: 14 Aug 2010
Total Posts: 6905
30 Aug 2011 03:20 PM
Please, double check your spelling and try to use grammar, I can't read that.
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
30 Aug 2011 03:21 PM
@ UFAIL2,

ikr,

if CurrentValue.Value == 0 then
PERSON.Humanpid.Health = 0
end

Report Abuse
JoelC2 is not online. JoelC2
Joined: 28 May 2010
Total Posts: 344
30 Aug 2011 03:21 PM
when the value of a hunger game like the hunger,thirst,sleep go to 0 then i want the oerson to die of hunger thirst or sleep


i just dont know how to indentify the person to acsess their humanoid or break:joint()
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
30 Aug 2011 03:23 PM
localize it,

local Player = game.Players.LocalPlayer
_G["Character"] = Player.Character
-- blah blah blah
Report Abuse
UFAIL2 is not online. UFAIL2
Joined: 14 Aug 2010
Total Posts: 6905
30 Aug 2011 03:24 PM
Um, you could just parent up until the Player, then access the Character.
Report Abuse
JoelC2 is not online. JoelC2
Joined: 28 May 2010
Total Posts: 344
30 Aug 2011 03:28 PM
Gui's go into the "Players Service" not "Workspace"
Report Abuse
UFAIL2 is not online. UFAIL2
Joined: 14 Aug 2010
Total Posts: 6905
30 Aug 2011 03:29 PM
Parent up the the Player, then use this:

Player.Character
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
30 Aug 2011 03:29 PM
Did you even read his post?

"Um, you could just parent up until the Player, then access the Character."
______ __ ____ ___ ______ ____ ______ ___ _________
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
30 Aug 2011 03:30 PM
That failed D:

~Stupid floodcheck~
Report Abuse
JoelC2 is not online. JoelC2
Joined: 28 May 2010
Total Posts: 344
30 Aug 2011 03:30 PM
OHH i didnt understand wat u meant bfore
Report Abuse
JoelC2 is not online. JoelC2
Joined: 28 May 2010
Total Posts: 344
30 Aug 2011 03:37 PM
This may have some fails but is this it?

_____________________________________________________________
local Player = script.Parent.Parent.Parent.Parent.Character
local CurrentValue = script.Parent.CurrentValue

if CurrentValue.Value == 0 then
game.Workspace.Player.Humanoid.Health = 0
end
______________________________________________________________
Report Abuse
UFAIL2 is not online. UFAIL2
Joined: 14 Aug 2010
Total Posts: 6905
30 Aug 2011 04:04 PM
Always include Output. Why did you define the Player, but not use it?

local Player = script.Parent.Parent.Parent.Parent.Character
local CurrentValue = script.Parent.CurrentValue

if CurrentValue.Value == 0 then
Player.Humanoid.Health = 0
end
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