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: Script Doesn't Work?

Previous Thread :: Next Thread 
Daredevilz is not online. Daredevilz
Joined: 15 Jun 2010
Total Posts: 1231
22 Jun 2014 09:59 PM
function onTouch(part)
Game.Workspace.Daredevilz.Humanoid.Health = 0
end

brick.Touched:connect(onTouch)

Wtf
Report Abuse
Daredevilz is not online. Daredevilz
Joined: 15 Jun 2010
Total Posts: 1231
22 Jun 2014 10:00 PM
bump
Report Abuse
Electrodacity is not online. Electrodacity
Joined: 07 Apr 2014
Total Posts: 225
22 Jun 2014 10:00 PM
I always was iffy using Game.Workspace.

Use game.Workspace.

----

function onTouch(part)
game.Workspace.Daredevilz.Humanoid.Health = 0
end

brick.Touched:connect(onTouch)

----

That should fix your problem. If it dosen't, tell me.

~ Electrodacity
Report Abuse
Daredevilz is not online. Daredevilz
Joined: 15 Jun 2010
Total Posts: 1231
22 Jun 2014 10:03 PM
Didn't work
Report Abuse
Daredevilz is not online. Daredevilz
Joined: 15 Jun 2010
Total Posts: 1231
22 Jun 2014 10:04 PM
bumpy
Report Abuse
Electrodacity is not online. Electrodacity
Joined: 07 Apr 2014
Total Posts: 225
22 Jun 2014 10:05 PM
Hmm.

Have you already set "brick" as a variable?

If you have, try this:

function onTouch(part)
game.Players["Daredevilz"].Character:BreakJoints()
end

brick.Touched:connect(onTouch)

~ Electrodacity
Report Abuse
Daredevilz is not online. Daredevilz
Joined: 15 Jun 2010
Total Posts: 1231
22 Jun 2014 10:07 PM
That didn't do anything either.

And the brick I'm using is named 'Part' without the apostrophes
Report Abuse
Daredevilz is not online. Daredevilz
Joined: 15 Jun 2010
Total Posts: 1231
22 Jun 2014 10:08 PM
Bumpy

Also I'm new to scripting.
Report Abuse
Daredevilz is not online. Daredevilz
Joined: 15 Jun 2010
Total Posts: 1231
22 Jun 2014 10:11 PM
Bump
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
22 Jun 2014 10:12 PM
script.Parent.Touched:connect(function(hit)
if game.Players:FindFirstChild(hit.Parent.Name) then
hit.Parent.Humanoid.Health = 0
end
end)
Report Abuse
Daredevilz is not online. Daredevilz
Joined: 15 Jun 2010
Total Posts: 1231
22 Jun 2014 10:13 PM
Bah, it's fine. Scripting is too complicated. I'm a better builder anyways.
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