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: HALP! PL0X

Previous Thread :: Next Thread 
LV1Z is not online. LV1Z
Joined: 23 Jul 2011
Total Posts: 652
16 Sep 2013 08:48 PM
So a raycast hits a player and the player takes damage blah blah

but when the player hits the other player and it's health == 0 this following portion of the script would not execute:

if mouse.Hit == hum then
if hum.Health <= 0 then
if player.leaderstats then
player.leaderstats.Kills.Value = player.leaderstats.Kills.Value + 1
local dead = game.Players:getPlayerFromCharacter(hum.Parent)
dead.leaderstats.Deaths.Value = dead.leaderstats.Deaths.Value + 1
end
end
end

ignore variables, assume that you them pls
Report Abuse
Jetta765214 is not online. Jetta765214
Joined: 22 Oct 2008
Total Posts: 1855
16 Sep 2013 08:52 PM
mouse.Hit == hum--isnt hum Humanoid?
Report Abuse
LV1Z is not online. LV1Z
Joined: 23 Jul 2011
Total Posts: 652
16 Sep 2013 09:12 PM
yes
Report Abuse
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
16 Sep 2013 09:17 PM
yolo
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
16 Sep 2013 11:01 PM
Mouse.hit returns a CFrame value.
Mouse.Target returns the part is hit, which can not be a humanoid since it's not visible in workspace. It would be torso or something.
Report Abuse
LV1Z is not online. LV1Z
Joined: 23 Jul 2011
Total Posts: 652
17 Sep 2013 06:39 PM
ty
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