fathawksJoin Date: 2012-07-08 Post Count: 506 |
I need an automatically swinging sword for my game so that the knights can help you... I can already make it not kill you only NPCs but I can't get it to swing on its own. Any help? |
|
fathawksJoin Date: 2012-07-08 Post Count: 506 |
I can't find any legit models to help. I know some RPGs use this method. |
|
connor954Join Date: 2008-07-24 Post Count: 947 |
You need to edit the script like this:
Instead of
mouse.Button1Down.... Do
while wait() do
--rest of swinging and animation |
|
danskJoin Date: 2008-12-24 Post Count: 548 |
Its in the sword script. There are functions such as swing and lunge in the script and I think you need to invoke them. Thats what I think anyway. |
|
fathawksJoin Date: 2012-07-08 Post Count: 506 |
So how often does it swing like that? |
|
danskJoin Date: 2008-12-24 Post Count: 548 |
Try it out. The bigger the number in the wait() the longer it takes. |
|
fathawksJoin Date: 2012-07-08 Post Count: 506 |
Wait will this work for an NPC |
|
fathawksJoin Date: 2012-07-08 Post Count: 506 |
And I cant find mouse.Button1Down and I looked through the script 4 times. What line is it DX |
|
danskJoin Date: 2008-12-24 Post Count: 548 |
Use the find function and find Button1Down |
|
fathawksJoin Date: 2012-07-08 Post Count: 506 |
Is it in the local gui? |
|
fathawksJoin Date: 2012-07-08 Post Count: 506 |
It cant find it in the sword script ..... |
|
danskJoin Date: 2008-12-24 Post Count: 548 |
I think its a function called onButton1Down. There has to be one because without it its impossible for it to be a usuable player sword unless you edited it |
|
fathawksJoin Date: 2012-07-08 Post Count: 506 |
I replaced the one and only in the local gui and guess what nothing happened when i went to test mode its a normal sword. |
|
danskJoin Date: 2008-12-24 Post Count: 548 |
If its in the workspace the local gui is useless. It only works if its inside a player. Local gui is a localScript thats why |
|
fathawksJoin Date: 2012-07-08 Post Count: 506 |
Are the admins really to lazy to help us |
|
fathawksJoin Date: 2012-07-08 Post Count: 506 |
askdjhfkaf Can you just give me the whole script with it fixed up to auto swing |
|
danskJoin Date: 2008-12-24 Post Count: 548 |
1st its a simple fix. 2nd dont disrespect the admins. They arent going to spend the rest of their lives helping people in scripting helpers. They do more work than you realize. Before you insult them, think about what they do first not running your mouth. |
|
fathawksJoin Date: 2012-07-08 Post Count: 506 |
i give up imma ask an old friend of mine |
|