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 » Scripters
Home Search
 

Help please

Previous Thread :: Next Thread 
sal212 is not online. sal212
Joined: 11 Apr 2010
Total Posts: 2929
04 Jul 2015 09:57 AM
Could you help me on a script where only some players can step on a brick and others that I dont list die? (Not a door) Just a brick.

New at scripting.
Report Abuse
sal212 is not online. sal212
Joined: 11 Apr 2010
Total Posts: 2929
04 Jul 2015 10:02 AM
er
Report Abuse
Altra0x8 is not online. Altra0x8
Joined: 19 Nov 2012
Total Posts: 22
04 Jul 2015 10:02 AM
yas u can use a table
Report Abuse
JosaiahValente is not online. JosaiahValente
Joined: 15 Dec 2012
Total Posts: 696
04 Jul 2015 10:06 AM
ur not helping
im not helping
im new too
i dont know where to start scripting
yolo
Report Abuse
BreaktheSilence is not online. BreaktheSilence
Joined: 13 Jan 2011
Total Posts: 599
04 Jul 2015 10:12 AM
You can kill people by doing the following:

function onTouch(otherPart)

if(otherPart.Parent:FindFirstChild("Humanoid") ~= nil) then

otherPart.Parent:FindFirstChild("Humanoid").Health = 0

end

end

script.Parent.Touched:connect(onTouch)

Now for making it so that some players that you list don't die you should add another if statement, where you can check the player's IDs. For example:

function onTouch(otherPart)

if(otherPart.Parent:FindFirstChild("Humanoid") ~= nil) then

if(game.Players:GetPlayerFromCharacter(otherPart.Parent).Name == "YourNameHere") then

otherPart.Parent:FindFirstChild("Humanoid").Health = 0

end

end

end

There is a way to check for userID's but I can't find anything on it so I'm not sure how it works. What I have given you there will still work though.

Any more questions feel free to ask. By the way the script goes in the block you want to kill people
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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