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

Previous Thread :: Next Thread 
Yusuf500 is not online. Yusuf500
Joined: 03 May 2011
Total Posts: 241
19 Aug 2013 05:30 PM
What's wrong in this script?

I have a boss called "Yus" in a game, he has a Humanoid, he has 100 health.

The script is:

-- Made by Yusuf500

if game.Workspace.Yus.Humanoid.Health == 0
then game.Workspace.Door.CanCollide = false
end


And yes, there is a door infront of him.
What I wanted to script, is that, if you killed the boss, you can take the chest inside the door.

Please help?
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
19 Aug 2013 05:31 PM
I would use the 'Died' event with his Humanoid. Would be more efficient than a continuous loop checking his health.

http://wiki.roblox.com/index.php/Died
Report Abuse
Yusuf500 is not online. Yusuf500
Joined: 03 May 2011
Total Posts: 241
19 Aug 2013 05:35 PM
Well, what can I personally do now?
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
19 Aug 2013 05:39 PM
-- Made by Yusuf500

game.Workspace.Yus.Humanoid.changed:connect(function(p)

if p == "health" then

if game.Workspace.Yus.Humanoid.Health == 0 then

game.Workspace.Door.CanCollide = false
end
end
end)
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
19 Aug 2013 05:40 PM
Workspace.Yus.Humanoid.Died:connect(function()
Workspace.Door.CanCollide = false
end)
Report Abuse
TechPerson32 is not online. TechPerson32
Joined: 25 Dec 2011
Total Posts: 81
19 Aug 2013 05:45 PM
boss = game.Workspace.Yus.Humanoid
function bosskilled()
game.Workspace.Door.CanCollide = false
end
boss.Died:connect(bosskilled)
Report Abuse
Yusuf500 is not online. Yusuf500
Joined: 03 May 2011
Total Posts: 241
20 Aug 2013 04:45 AM
Thank you.
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 04:48 AM
umadbro
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 04:51 AM
LEL
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 04:57 AM
nou
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 05:00 AM
get out
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 05:02 AM
morgan freeman k
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 05:05 AM
bump
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 05:07 AM
morgan freeman k
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 05:11 AM
meow
Report Abuse
mark298 is not online. mark298
Joined: 24 Oct 2008
Total Posts: 1264
20 Aug 2013 05:12 AM
Eat pie or I pwn you!!! >:O
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 05:14 AM
LEL
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 05:18 AM
uwotm8
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 05:22 AM
bump
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 05:24 AM
lol!!! nice idea xD
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 05:29 AM
your outfit is EPIC
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 05:33 AM
YES. just yes
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 05:37 AM
get out
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 05:39 AM
meow
Report Abuse
OldGoldie is not online. OldGoldie
Joined: 17 Aug 2010
Total Posts: 8210
20 Aug 2013 05:43 AM
my name is roooobot
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