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

How do I make a bayonet script?

Asked by 10 years ago

I was trying to make a gun with a bayonet and i wanted it to do damage, the script I have in it is called "BayonetScript"

001r = game:service("RunService")
002 
003 
004local damage = 7
005 
006 
007local slash_damage = 15
008local lunge_damage = 45
009 
010sword = script.Parent.Handle
011Tool = script.Parent
012 
013 
014local SlashSound = Instance.new("Sound")
015SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
View all 217 lines...

1 answer

Log in to vote
0
Answered by 10 years ago

I think you need to delete the "--" from every green text, because green text means normal test not script.

0
Green text is a comment, which means that ROBLOX completely ignores whatever is written after --. In this case, the original author of this script wanted some of the code to be optional. Stop using your rear to come up with answers, and learn to use your head! OniiCh_n 410 — 10y
0
Green text is a comment, which means that ROBLOX completely ignores whatever is written after --. In this case, the original author of this script wanted some of the code to be optional. Stop using your rear to come up with answers, and learn to use your head! OniiCh_n 410 — 10y
0
okay xXxCONBOY456xXx 15 — 10y
Ad

Answer this question