I was trying to add attack if a person pressed a button but it doesn’t work can anyone tell me why?
uis.InputBegan:Connect(function(input, gameProcessedEvent)
if db then
db = false
if input.KeyCode == Enum.KeyCode.E then
Hitbox:Hitstart(2)
char.WalkSpeed = 0
char.JumpHeight = 0
if Spin then
Spin:Play()
wait(2)
char.WalkSpeed = 16
char.JumpHeight = 7.2
end
end
wait(8)
db = true
end
end)
char is tool.parent and the problem is if I change uis.InputBegan to Tool.Activated and remove input stuff the attack works normally (sorry for the bad explanation)