I cannot understand why my sword is not slashing I am using the tutorial that Stickmasterluke has provided and I'm stuck trying to create this sword ? The Error = Error: (40,17) Expected identifier, got ') I am on the Mad Bloxxer 6: Script the Sword, Pt. 2 (ROBLOX U Tutorial)
-- Made by Rualmoneyman567
tool = script.Parent
local speedboost = 1.35
local damage = 26
local swingtime = 2
local handle = tool:WaitForChild("Handle")
local event = tool:WaitForChild("RemoteEvent")
local lastclick = tick()
handle.Touched:connect(function(hit)
if equiupped and character and humanoid and humanoid.Health > 0 and not hit and hit:IsDesecendantOf(character)
then
local targethumnoid = hit.Parent:FindFirstChild("Humanoid")
if targethumanoid and targethumanoid.Health > 0 then
hithumanoids[targethumanoid] = true
targethumnoid:TakeDamage(damage)
end
end
end)
tool.Activated:connect(function()
local clickdelta = tick() - lastclick
if clickdelta > swingtime then
lastclick = tick()
hithumanoid = ()
end
end)
tool.Equipped:connect(function()
equipped = true
lastclick = tick()
character = tool.Parent
player = game.Players:GetPlayerFromCharacter(character)
humanoid = character:FindFirstChild("Humanoid")
if humanoid then
humanoid.WalkSpeed = humanoid.WalkSpeed * speedboost
else
character = nil
end
end)
tool.Unequipped:connect(function()
equipped = false
if humanoid then
humanoid.WalkSpeed = humanoid.WalkSpeed / speedboost
end
character = nil
humanoid = nil
end)
The error i get is Error: (40,17) Expected identifier, got ')'

2 comments
Where is the error?
line 24 should be "equipped"