of     1   

Dark_Yugi
#139370571Sunday, July 06, 2014 12:54 AM GMT

Okay, I am trying to get a players humanoid through a variable. Currently, I have; Okay, so I removed all of the locals and had no luck. There was no output, and all my script is game.ServerStorage["Give Items"].Event:connect(function() players = {} Assassin = "" Protector = "" function GetPlayers() for i,v in pairs(game.Players:GetChildren()) do table.insert(players,v) end end GetPlayers() function SelectPlayer() num = math.random(1,#players) Assassin = players[num].Name print('Assassin is: ' ..Assassin) end SelectPlayer() function SelectPlayer2() num = math.random(1,#players) Protector = players[num].Name print('Protector is: ' ..Protector) end SelectPlayer2() if Assassin == Protector then SelectPlayer2() end if Assassin == Protector then SelectPlayer2() end if Assassin == Protector then SelectPlayer2() end if Assassin == Protector then SelectPlayer2() end if Assassin == Protector then SelectPlayer2() end function Sword(player) player = game.Players:FindFirstChild(player) Sword = game.ServerStorage.MidnightSword:clone() if player~= nil then Sword.Parent=player.Backpack end end function Bow(player) player = game.Players:FindFirstChild(player) Bow = game.ServerStorage.DynamicallyLitBow:clone() if player~= nil then Bow.Parent=player.Backpack end end Sword(Assassin) Bow(Protector) end) AssassinPlayer = game.Workspace:FindFirstChild(Assassin) if AssassinPlayer.Humanoid.Health == 0 then game.ServerStorage["Victims Won"]:Fire() end When I reset, it didn't fire the the event. There are no errors in the script, either. Nothing in output; nothing. Why?
Dark_Yugi
#139374542Sunday, July 06, 2014 1:38 AM GMT

help?
Dark_Yugi
#139433210Sunday, July 06, 2014 5:25 PM GMT

Maybe someone can help.
SuperNintendo
#139439164Sunday, July 06, 2014 6:31 PM GMT

Someone should help this kid.
Dark_Yugi
#139455643Sunday, July 06, 2014 9:07 PM GMT

@SuperNintendo uhm cool
SuperNintendo
#139463992Sunday, July 06, 2014 10:31 PM GMT

I agree.
SuperNintendo
#139471264Sunday, July 06, 2014 11:52 PM GMT

I approve OP's game.
Dark_Yugi
#139501603Monday, July 07, 2014 4:48 AM GMT

Uhm, okay?
Dark_Yugi
#139606348Tuesday, July 08, 2014 3:14 AM GMT

Help?
Casualist
#139607517Tuesday, July 08, 2014 3:26 AM GMT

game.ServerStorage["Give Items"].Event:connect(function() players = {} Assassin = "" Protector = "" function GetPlayers() for i,v in pairs(game.Players:GetChildren()) do table.insert(players,v) end end GetPlayers() function SelectPlayer() num = math.random(1,#players) Assassin = players[num].Name print('Assassin is: ' ..Assassin) end SelectPlayer() function SelectPlayer2() num = math.random(1,#players) Protector = players[num].Name print('Protector is: ' ..Protector) end SelectPlayer2() if Assassin == Protector then SelectPlayer2() end if Assassin == Protector then SelectPlayer2() end if Assassin == Protector then SelectPlayer2() end if Assassin == Protector then SelectPlayer2() end if Assassin == Protector then SelectPlayer2() end function Sword(player) player = game.Players:FindFirstChild(player) Sword = game.ServerStorage.MidnightSword:clone() if player~= nil then Sword.Parent=player.Backpack end end function Bow(player) player = game.Players:FindFirstChild(player) Bow = game.ServerStorage.DynamicallyLitBow:clone() if player~= nil then Bow.Parent=player.Backpack end end Sword(Assassin) Bow(Protector) end) game.Workspace:FindFirstChild(Assassin).Humanoid.Died:connect(function() game.ServerStorage["Victims Won"]:Fire() end)
Dark_Yugi
#139615434Tuesday, July 08, 2014 4:56 AM GMT

It just says in the output Error: GameScript2 Line 72 which is game.Workspace:FindFirstChild(Assassin).Humanoid.Died:connect(function()
StingyShaun
#139615958Tuesday, July 08, 2014 5:02 AM GMT

You forgot some quotations/" " around assassin
Dark_Yugi
#139616776Tuesday, July 08, 2014 5:13 AM GMT

I thought you don't need quotations to reference variables.
StingyShaun
#139616999Tuesday, July 08, 2014 5:16 AM GMT

Well if the script isn't working, I suggest giving it a try
Casualist
#139626386Tuesday, July 08, 2014 7:46 AM GMT

game.ServerStorage["Give Items"].Event:connect(function() players = {} Assassin = "" Protector = "" function GetPlayers() for i,v in pairs(game.Players:GetChildren()) do table.insert(players,v) end end GetPlayers() function SelectPlayer() num = math.random(1,#players) Assassin = players[num].Name print('Assassin is: ' ..Assassin) end SelectPlayer() function SelectPlayer2() num = math.random(1,#players) Protector = players[num].Name print('Protector is: ' ..Protector) end SelectPlayer2() if Assassin == Protector then SelectPlayer2() end if Assassin == Protector then SelectPlayer2() end if Assassin == Protector then SelectPlayer2() end if Assassin == Protector then SelectPlayer2() end if Assassin == Protector then SelectPlayer2() end function Sword(player) player = game.Players:FindFirstChild(player) Sword = game.ServerStorage.MidnightSword:clone() if player~= nil then Sword.Parent=player.Backpack end end function Bow(player) player = game.Players:FindFirstChild(player) Bow = game.ServerStorage.DynamicallyLitBow:clone() if player~= nil then Bow.Parent=player.Backpack end end Sword(Assassin) Bow(Protector) end) Assassin.Humanoid.Died:connect(function() game.ServerStorage["Victims Won"]:Fire() end)
Dark_Yugi
#139729924Wednesday, July 09, 2014 4:44 AM GMT

Same line. 00:43:23.853 - ServerScriptService.GameScript2:72: attempt to index global 'Assassin' (a nil value) 00:43:23.855 - Script 'ServerScriptService.GameScript2', Line 72 00:43:23.856 - ServerScriptService.Script:1: attempt to index global 'character' (a nil value)
Dark_Yugi
#140128910Saturday, July 12, 2014 9:43 PM GMT

Bump

    of     1