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 Error

Previous Thread :: Next Thread 
SuperPhineas18 is not online. SuperPhineas18
Joined: 22 Sep 2011
Total Posts: 41
14 Oct 2014 07:58 PM
So I have been making a game with the ROBLOX U "Mad Bloxxer" videos. I went to test out my sword but a error occurred in the script. The error was on this line of code:
local slashsound = handle:WaitForChild("SlashSound")

What is wrong with it and how can I fix it?

Output is: 17:27:04.132 - Players.Player1.Backpack.Sword.SwordScript:15: attempt to index global 'handle' (a nil value)

17:27:05.370 - Players.Player1.Backpack.Sword.SwordLocalScript:28: unexpected symbol near ')'

More of the script is:
local handel = tool:WaitForChild("Handle")
local event = tool:WaitForChild("RemoteEvent")
local slashsound = handle:WaitForChild("SlashSound")
local overheadsound = handle:WaitForChild("OverheadSound")
local lungesound = handle:WaitForChild("LungeSound")

local lastclick = tick()
local combo = 0



handle.Touched:connect(function(hit)
if equipped and character and humanoid and humanoid.Health > 0 and hit and not hit:isDescendantOf(character) then
localtargethumanoid = hit.Parent:FindFirstChild("Humanoid")
if targethumanoid and targethumanoid.Health > 0 and not hithumanoid[targethumanoid] then
hithumanoids[targethumanoid] = true
tagethumaniod:TakeDamage (damage * combo)
Report Abuse
iiUltimate is not online. iiUltimate
Joined: 29 Mar 2012
Total Posts: 3694
14 Oct 2014 08:18 PM
You made a typo on "handel", and you forgot to end the handle.Touched statement.
Report Abuse
Bluecage is not online. Bluecage
Joined: 03 Mar 2013
Total Posts: 1396
14 Oct 2014 08:19 PM
local handle = tool:WaitForChild("Handle")
local event = tool:WaitForChild("RemoteEvent")
local slashsound = handle:WaitForChild("SlashSound")
local overheadsound = handle:WaitForChild("OverheadSound")
local lungesound = handle:WaitForChild("LungeSound")

local lastclick = tick()
local combo = 0



handle.Touched:connect(function(hit)
if equipped and character and humanoid and humanoid.Health > 0 and hit and not hit:isDescendantOf(character) then
localtargethumanoid = hit.Parent:FindFirstChild("Humanoid")
if targethumanoid and targethumanoid.Health > 0 and not hithumanoid[targethumanoid] then
hithumanoids[targethumanoid] = true
tagethumaniod:TakeDamage (damage * combo)
Report Abuse
SuperPhineas18 is not online. SuperPhineas18
Joined: 22 Sep 2011
Total Posts: 41
14 Oct 2014 08:29 PM
How do I fix this?
21:26:25.835 - Players.Player2.Backpack.Sword.SwordLocalScript:28: unexpected symbol near ')'

21:26:23.492 - connecet is not a valid member
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