of     1   

Vexchan
#183694459Monday, February 15, 2016 8:21 PM GMT

If I have this intvalue in a sword and whatever this value is, is how much damage the player does. s = workspace.Damage.Value player.Character.Humanoid:TakeDamage(s) Aboves an example. Any idea why this doesnt work and just tells me its a nil value?
jhend27513
#183694582Monday, February 15, 2016 8:23 PM GMT

Not too sure but doesn't it strictly need an integer not any variable?
Vexchan
#183694711Monday, February 15, 2016 8:24 PM GMT

The number is the value inside of the IntValue. Int's only take Numbers as well, so it shouldnt have a problem, but for some reason it does?
JarodOfOrbiter
#183694777Monday, February 15, 2016 8:25 PM GMT

Specifically, what does the output say?
Vexchan
#183694925Monday, February 15, 2016 8:27 PM GMT

15:27:37.824 - Players.Player1.Backpack.Fight1:19: attempt to index a nil value 15:27:37.824 - Stack Begin 15:27:37.825 - Script 'Players.Player1.Backpack.Fight1', Line 19 15:27:37.825 - Stack End
JarodOfOrbiter
#183694978Monday, February 15, 2016 8:27 PM GMT

Did you define everything?
Vexchan
#183694984Monday, February 15, 2016 8:28 PM GMT

18 : local s = player.Damage.Value 19 : hit.Parent:FindFirstChild("Robot"):TakeDamage(s This is the line of code it errors on
Vexchan
#183695034Monday, February 15, 2016 8:28 PM GMT

Theres a parenthesis at the end of the s I missed copying it.
JarodOfOrbiter
#183695048Monday, February 15, 2016 8:28 PM GMT

Is hit defined? Can it find Robot? It can't find Robot, I bet.
Vexchan
#183695130Monday, February 15, 2016 8:29 PM GMT

Holy crap you're right lol. I had changed the Humanoids names earlier, and then I changed them back and forgot to change this. lol thx a ton!

    of     1