I was making a ability and I got a error
(58,1) Expected ‘)’ to close ‘(’ at line 46), go end
script.Parent.RemoteEvent.OnServerEvent:Connect(function(caller, KeyCode) -------line 46
if KeyCode == Enum.KeyCode.Q then
print("dsa")
if db then
db = false
Hitbox:HitStart(2)
Spin:Play()
end
end
wait(T)
db = true
end
end) ---------------- line 51
local RaycastHitbox = require(game.ReplicatedStorage.RaycastHitboxV4)
local Hitbox = RaycastHitbox.new(script.Parent.Handle)
local uis = game:GetService("UserInputService")
local db = true
uis.InputBegan:Connect(function(input, gameProcessedEvent)
if gameProcessedEvent == false then
script.Parent.RemoteEvent:FireServer(input.KeyCode)
end
end)
I think it’s better to set db back to true inside the if db then
script.Parent.RemoteEvent.OnServerEvent:Connect(function(caller, KeyCode) -------line 46
if KeyCode == Enum.KeyCode.Q then
print("dsa")
if db then
db = false
Hitbox:HitStart(2)
Spin:Play()
task.wait(T)
db = true
end
end
end)
script.Parent.RemoteEvent.OnServerEvent:Connect(function(caller, KeyCode)
if KeyCode == Enum.KeyCode.Q then
print("dsa")
if db then
db = false
Hitbox:HitStart(2)
Spin:Play()
wait(3)
db = true
end
end
end
end)
script.Parent.RemoteEvent.OnServerEvent:Connect(function(caller, KeyCode)
if KeyCode == Enum.KeyCode.Q then
print("dsa")
if db then
db = false
Hitbox:HitStart(2)
Spin:Play()
task.wait(3)
db = true
end
end
end)