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: Why isn't this working?

Previous Thread :: Next Thread 
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
14 Dec 2012 10:23 AM
Everything works fine except for the killing part.

hop = Instance.new("HopperBin",game.Players.cyclone3260.Backpack)
hop.Selected:connect(function(mouse)
mouse.Button1Down:connect(function()
Workspace.cyclone3260.Torso['Right Shoulder'].DesiredAngle = 2.45
Workspace.cyclone3260.Torso['Right Shoulder'].MaxVelocity = 2
Workspace.cyclone3260.Torso['Left Shoulder'].DesiredAngle = 0.90
Workspace.cyclone3260.Torso['Left Shoulder'].MaxVelocity = 2
Workspace.cyclone3260.Animate.Disabled = true
wait(.5)
Workspace.cyclone3260.Animate.Disabled = false
game.Workspace.cyclone3260["Right Arm"].Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and game.Players.LocalPlayer.Character.Torso['Right Shoulder'].DesiredAngle == 2.45 then
hit.Parent:BreakJoints()
end
end)
end)
end)
Report Abuse
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
14 Dec 2012 10:54 AM
Bump?
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
14 Dec 2012 11:07 AM
Any output?
Report Abuse
sycips is not online. sycips
Joined: 21 Mar 2011
Total Posts: 1368
14 Dec 2012 11:46 AM
try ["Right Shoulder"] instead of ['Right Shoulder'] (difference is the ' and the ")

~sycips~
Report Abuse
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
14 Dec 2012 11:46 AM
Output say's it's working fine...


That lying piece of blox..
Report Abuse
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
14 Dec 2012 11:47 AM
@Sycips. There will be no difference.



A string is a string.
Report Abuse
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
14 Dec 2012 01:50 PM
Bump... -_-
Report Abuse
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
14 Dec 2012 02:34 PM
Nob scriptors! Help meh!
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
14 Dec 2012 02:49 PM
Change it to Humanoid.Health = 0 and see if it works.
Report Abuse
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
14 Dec 2012 04:14 PM
Oh! Guess what?! :D


It didn't work.
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
14 Dec 2012 04:18 PM
No output, no visual errors, I don't know what you have done, but it must be that your events are not triggered properly.
Report Abuse
sycips is not online. sycips
Joined: 21 Mar 2011
Total Posts: 1368
14 Dec 2012 04:48 PM
How do you expect from us to fix your script if theres no error and you didnt even tell what the problem is? That the same thing as giving this script:

print(workspace.Lol.Asdf.TopSurface)

And saying it doesnt work... what would be the problem. IDK! THE SCRIPT IS FINE!?!?!
Report Abuse
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
14 Dec 2012 05:13 PM
...

I said that everything works fine besides the killing part.

>How do you expect us to fix your script if there's no error

Maybe one of you guys must of done the same thing and may know what's wrong with my script.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
14 Dec 2012 05:15 PM
Are you sure the DesiredAngle is whatever it should be when you touch someting? Try removing the check for it, and try it. If it works, then you know that was the problem.

¤ † KMXD† ¤
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
14 Dec 2012 05:19 PM
The decimal. ROBLOX is weird like that, like if you set UDim2 to something like, UDim2.new(.2,0,.2,0) it will look something like, {0.200003,0},{0.200003,0}
Try doing something like this,

local angle = RightArm.DesiredAngle
local hum = hit.Parent:FindFirstChild("Humanoid")
if(angle>2.44 and angle<2.46 and hum)then
hum:TakeDamage(hum.MaxHealth) -- TakeDamage will not fire if there is a forcefield on
end
Report Abuse
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
14 Dec 2012 06:23 PM
Okay,

So I did this;

hop = Instance.new("HopperBin",game.Players.cyclone3260.Backpack)
local angle = game.Workspace.cyclone3260.Torso['Right Shoulder'].DesiredAngle
hop.Selected:connect(function(mouse)
mouse.Button1Down:connect(function()
Workspace.cyclone3260.Torso['Right Shoulder'].DesiredAngle = 2.45
Workspace.cyclone3260.Torso['Right Shoulder'].MaxVelocity = 2
Workspace.cyclone3260.Torso['Left Shoulder'].DesiredAngle = 0.90
Workspace.cyclone3260.Torso['Left Shoulder'].MaxVelocity = 2
Workspace.cyclone3260.Animate.Disabled = true
wait(.5)
Workspace.cyclone3260.Animate.Disabled = false
game.Workspace.cyclone3260["Right Arm"].Touched:connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if(angle>2.44 and hum)then
hum:TakeDamage(-100)
end
end)
end)
end)
---------------------
Damage still didn't work.
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