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: simple kill door help

Previous Thread :: Next Thread 
snowboarder199 is not online. snowboarder199
Joined: 15 Aug 2009
Total Posts: 2703
06 Aug 2012 09:05 PM
c/ p = Instance.new("Part")
p.Position = game.Workspace.snowboarder199.Head.Position
p.Anchored = true
p.Size = Vector3.new(5,1,5)
p.Parent = game.Workspace
p.Transparency = 0
p.TopSurface = "Smooth"
p.BottomSurface = "Smooth"
p.FormFactor = "Symmetric"
p.Touched:connect(function(hit)
hum = hit.Parent:findFirstChild("Humanoid")
if hum ~= nil then
pl = game.Players:GetPlayerFromCharacter(hit. Parent)
if pl.Name ~= "snowboarder199" or "lkira66" then
hit.Humanoid.MaxHealth = 0
end
end
end)




ts supposed to kill anyone thats not me or lkira66 but it wont ._. whats going wrong?
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
06 Aug 2012 09:07 PM
It won't let me post it, but just check if the player's name again, like if pl.Name ~= name or pl.Name ~= othername.

† KMXD †
Report Abuse
DangCool is not online. DangCool
Joined: 27 Apr 2010
Total Posts: 5568
06 Aug 2012 09:08 PM
[ Content Deleted ]
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
06 Aug 2012 09:08 PM
I'm going to try again:

    if string.lower(pl.Name) ~= "snowboarder199" or string.lower(pl.Name) ~= "lkira66" then

† KMXD †
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
06 Aug 2012 09:09 PM
@Dang irk?

I finally got it, maybe it didn't like me using the shortcut to that particular string manipulation?

† KMXD †
Report Abuse
snowboarder199 is not online. snowboarder199
Joined: 15 Aug 2009
Total Posts: 2703
06 Aug 2012 09:10 PM
ok ill try it, thanks ^_^
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
06 Aug 2012 09:11 PM
Wait no! Logic error...

Try:

if string.lower(pl.Name) == "snowboarder199" or string.lower(pl.Name) == "lkira66" then


† KMXD †
Report Abuse
DangCool is not online. DangCool
Joined: 27 Apr 2010
Total Posts: 5568
06 Aug 2012 09:14 PM
[ Content Deleted ]
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
06 Aug 2012 09:17 PM
Wow, forgot about that!

c/ p = Instance.new("Part")
p.Position = game.Workspace.snowboarder199.Head.Position
p.Anchored = true
p.Size = Vector3.new(5,1,5)
p.Parent = game.Workspace
p.Transparency = 0
p.TopSurface = "Smooth"
p.BottomSurface = "Smooth"
p.FormFactor = "Symmetric"
p.Touched:connect(function(hit)
hum = hit.Parent:findFirstChild("Humanoid")
if hum ~= nil then
pl = game.Players:GetPlayerFromCharacter(hit. Parent)
if string.lower(pl.Name) == "snowboarder199" or string.lower(pl.Name) == "lkira66" then
print("Yay")
else
hit.Parent:BreakJoints()
end
end
end)

† KMXD †
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