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: Removing a players body part?

Previous Thread :: Next Thread 
jhend27513 is not online. jhend27513
Joined: 17 Sep 2011
Total Posts: 3369
28 Apr 2013 05:44 PM
How can I make this script only remove parts if it's part of a Player's Character?

local d = game.Workspace.death
local open = script.Parent

function onClicked(playerWhoClicked)
d.CanCollide = false
d.Transparency = 0.5
open.BrickColor = BrickColor.new("Black")
wait(3)
open.BrickColor = BrickColor.new("Bright green")
wait(3)
d.CanCollide = true
d.Transparency = 0
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)


#YourMother
Report Abuse
th3oracle is not online. th3oracle
Joined: 23 Feb 2013
Total Posts: 448
28 Apr 2013 05:47 PM
Be more specific...
Report Abuse
jhend27513 is not online. jhend27513
Joined: 17 Sep 2011
Total Posts: 3369
28 Apr 2013 06:45 PM
When the scripts parent(A part) touches a brick, if it is a Character's part, like left arm or torso, it get's removed.

#YourMother
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
28 Apr 2013 06:54 PM
local h = part.Parent:FindFirstChild("Left Arm")
if h ~= nil then
h:Destroy()
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