|
| 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 |
|
|
|
| 14 Oct 2014 08:18 PM |
| You made a typo on "handel", and you forgot to end the handle.Touched statement. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|