comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
|
| 24 Sep 2011 01:10 PM |
Any output?
Problem MAY be
dama = string.sub(msg, endspace + 1)
Dama is a string
script.Parent.Damage.Value = damage Damage is a number/intvalue
Setting string as value for number- or intvalue, probably errors? ;3
I cant think of anything else. |
|
|
| Report Abuse |
|
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
|
| 24 Sep 2011 01:14 PM |
is "Damage" a IntValue or NumberValue? if not, what is it? |
|
|
| Report Abuse |
|
|
|
| 24 Sep 2011 01:15 PM |
Also "targ" doesnt exist since you have set it
targ = players[b]
when "players" is in.
Its "plays" in your script. |
|
|
| Report Abuse |
|
|
|
| 24 Sep 2011 01:18 PM |
Ah. The problem was on the "targ"
since "targ" doesnt exist, it skips
if targ ~= nil then print("#") dama = string.sub(msg, endspace + 1) print("#") -- HERE IS THE LAST ONE THAT RUNS
shoot(targ.Character.Torso.CFrame.p, dama) print("#") end
totally. Just add some other letters on those prints, and you will see |
|
|
| Report Abuse |
|
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
|
| 24 Sep 2011 01:34 PM |
It didnt find any players with the name you tried.
Problem line: playname = string.sub(msg, 13, endspace - 1)
|
|
|
| Report Abuse |
|
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
|
| 24 Sep 2011 01:50 PM |
Fix for the script:
endspace = string.find(string.sub(msg, 13), " ")+12
msg is "Alpha shoot comiconor 50" endspace searches for space from "comiconor 50" which returns 9 (i think) so endspace returns 9, and you try to string.sub(msg,13,9), which returns nothing.
This is why you need to add the amount you decreased minus 1 (12), so it will find your name from string.sub(msg,13,21), which is "comiconor". |
|
|
| Report Abuse |
|
|