Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a double click function?

Asked by
Noxnuo 11
4 years ago

Yes I know I asked this yesterday but I didnt get a lot of people to help me. And Im kind of confused on where the ticks should go so may I get some help please? And if you get a kind of line I should put in my script can you tell which line number I should put it in? And which script should I put it in?

My script for attacking:

1script.Parent.DamagePart.Touched:Connect(function(p)
2    if script.Parent.CanDamage.Value == true then
3    script.Parent.CanDamage.Value = false
4    p.Parent.Humanoid:TakeDamage(10)
5    wait(0.8)
6    script.Parent.CanDamage.Value = true
7    end
8end)

My LocalScript:

01local CanAttack = true
02 
03script.Parent.Equipped:Connect(function()
04    local Idle = script.Parent.Parent.Humanoid:LoadAnimation(script.Idle)
05    local Slash = script.Parent.Parent.Humanoid:LoadAnimation(script.Slash)
06 
07    Idle:Play()
08end)
09 
10script.Parent.Activated:Connect(function()
11    local Idle = script.Parent.Parent.Humanoid:LoadAnimation(script.Idle)
12    local Slash = script.Parent.Parent.Humanoid:LoadAnimation(script.Slash)
13 
14    if CanAttack == true then
15        Slash:Play()
View all 24 lines...
0
By the way this is for my swords. I want a function to happen with the swords. Noxnuo 11 — 4y
0
Why do you need ticks? AntiWorldliness 868 — 4y

Answer this question