tool.Equipped:Connect(function()
if hum.Health <= 0 then return end
idle:Play()
b1d = mouse.Button1Down:Connect(function()
if hum.Health <= 0 then return end
if deb == false then deb= true
if on == false then on = true
anim1:Play()
throw.Pitch = math.random(1,2)
throw:Play()
if msp:UserOwnsGamePassAsync(plr.UserId, gamepassid) then
plr.PlayerStats.EXP.Value = plr.PlayerStats.EXP.Value + 50
else plr.PlayerStats.EXP.Value = plr.PlayerStats.EXP.Value + 25
local mydeb = false
rht = rh.Touched:Connect(function(hit)
if hum.Health <= 0 then return end
if mydeb == false then mydeb = true
if hit.Parent:FindFirstChild("Humanoid") then
pE:InvokeServer(hit.Parent:FindFirstChild("Humanoid"), dmg, hit)
end)
end
end)
end
end
end
end
end)
end
end
end
the first end) has an error saying "expected identifier when parsing expression, got ')'"
what is wrong with this code block?

4 comments
It's not necessarily that 'end' and 'end)' are two different things. 'end' ends stuff like functions, if statements, loops, etc., the other one does the same thing, but also has a closing parenthesis after it. In the case of connecting a function to an event, you put 'end' to end the function and the ')' part just closes off the opening parenthesis at ":Connect(". Other than that, a good explanati
i thought i had it after you explained but it still is not working.
i thought i had it after you explained but it still is not working.
Well, the easiest way to solve your problem is reweite your own code. When you will press enter, Roblox will automatically add the correct end.