of     1   

Dark_Yugi
#139344346Saturday, July 05, 2014 8:14 PM GMT

Is there anyway to find a humanoid through a variable? I tried stuff like game.Workspace:FindFirstChild(Assassin) 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() local num = math.random(1,#players) Assassin = players[num].Name print('Assassin is: ' ..Assassin) end SelectPlayer() function SelectPlayer2() local 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) local player = game.Players:FindFirstChild(player) local Sword = game.ServerStorage.MidnightSword:clone() if player~= nil then Sword.Parent=player.Backpack end end function Bow(player) local player = game.Players:FindFirstChild(player) local Bow = game.ServerStorage.DynamicallyLitBow:clone() if player~= nil then Bow.Parent=player.Backpack end end Sword(Assassin) Bow(Protector) end)
Dark_Yugi
#139349433Saturday, July 05, 2014 9:07 PM GMT

Help please?
Lacryma
#139349768Saturday, July 05, 2014 9:11 PM GMT

so vague just post a script and expect us to know exactly what ur talking about good job
Dark_Yugi
#139350019Saturday, July 05, 2014 9:13 PM GMT

>Shows a method I used with FindFirstChild inside of workspace to find the assassin, still vague.
Dark_Yugi
#139350096Saturday, July 05, 2014 9:14 PM GMT

Did you even read the text I have at the top above the script?
AnonyAnonymous
#139350172Saturday, July 05, 2014 9:14 PM GMT

Remove the local infront of num and try it again.
Lacryma
#139350211Saturday, July 05, 2014 9:15 PM GMT

woah u found an assassin, u must feel very special
Lacryma
#139350336Saturday, July 05, 2014 9:16 PM GMT

"Finding Humanoid through variable?" >does not see any attempt of trying to find humanoid
Dark_Yugi
#139350780Saturday, July 05, 2014 9:21 PM GMT

You should really be like Anon and stop acting like an imbecile, dueling. lol And the character didn't even do anything when the health hit zero. So I have this script AssassinPlayer = game.Workspace:FindFirstChild(Assassin) if AssassinPlayer.Health == 0 then game.ServerStorage["Victims Won"]:Fire() end and the player doesn't die.
Dark_Yugi
#139351854Saturday, July 05, 2014 9:32 PM GMT

bump
Lacryma
#139352065Saturday, July 05, 2014 9:35 PM GMT

oh cool the vagueness continues
Dark_Yugi
#139352199Saturday, July 05, 2014 9:36 PM GMT

oh cool you have nothing better to do with your life than complaining about someone whos been scripting for a week congrats
AnonyAnonymous
#139352210Saturday, July 05, 2014 9:36 PM GMT

Remove all of the locals and inform us of the result.
AnonyAnonymous
#139352706Saturday, July 05, 2014 9:41 PM GMT

Also, AssassinPlayer = game.Workspace:FindFirstChild(Assassin) if AssassinPlayer.Humanoid.Health == 0 then game.ServerStorage["Victims Won"]:Fire() end
Dark_Yugi
#139352788Saturday, July 05, 2014 9:42 PM GMT

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) AssassinHumanoid = game.Workspace:FindFirstChild(Assassin) if AssassinHumanoid.Health == 0 then game.ServerStorage["Victims Won"]:Fire() end When I reset, it didn't fire the the event.
Dark_Yugi
#139352975Saturday, July 05, 2014 9:44 PM GMT

I added the .Humanoid and got the same results.
Dark_Yugi
#139354138Saturday, July 05, 2014 9:55 PM GMT

Bump
Dark_Yugi
#139357019Saturday, July 05, 2014 10:24 PM GMT

Bump
Dark_Yugi
#139364959Saturday, July 05, 2014 11:54 PM GMT

bump
AnonyAnonymous
#139365118Saturday, July 05, 2014 11:56 PM GMT

Any output errors?.
Dark_Yugi
#139365267Saturday, July 05, 2014 11:57 PM GMT

All my output says when the assassin dies is 19:56:30.873 - Started network server 127.0.0.1|53640 19:56:30.896 - Argument 1 missing or nil 19:56:30.897 - Script 'ServerScriptService.GameScript2', Line 72 19:56:30.898 - Stack End 19:56:30.899 - ServerScriptService.Script:1: attempt to index global 'character' (a nil value) 19:56:30.900 - Stack Begin 19:56:30.900 - Script 'ServerScriptService.Script', Line 1 19:56:30.901 - Stack End 19:56:30.918 - No assetUrl set 19:56:30.919 - Script 'ServerScriptService.Kohl's Admin Commands V2', Line 2436 19:56:30.919 - Stack End Loading Cutscene Editor... 19:56:31.114 - Successfully opened file - C:/Users/trevo_000/AppData/Local/Roblox/server.rbxl 19:56:36.560 - MarketplaceService:GetProductInfo() productInfoUrl is empty 19:56:36.561 - Script 'ServerScriptService.LuaModelMaker's Admin', Line 546 19:56:36.561 - Stack End 19:56:36.567 - An error occurred 19:56:36.568 - Script 'C:/Users/trevo_000/AppData/Local/Roblox/Plugins/GameInfo.lu', Line 16 - global getAllChildren 19:56:36.568 - Script 'C:/Users/trevo_000/AppData/Local/Roblox/Plugins/GameInfo.lu', Line 18 - global getAllChildren 19:56:36.569 - Script 'C:/Users/trevo_000/AppData/Local/Roblox/Plugins/GameInfo.lu', Line 25 - global getInstanceCount 19:56:36.570 - Script 'C:/Users/trevo_000/AppData/Local/Roblox/Plugins/GameInfo.lu', Line 112 19:56:36.570 - Stack End 19:56:38.954 - New connection from 127.0.0.1|65426 Player -1 added 19:56:40.574 - New connection from 127.0.0.1|65427 Player -2 added Cutscene Editor Loaded Hello world! Hello world! Hello world! Assassin is: Player1 Protector is: Player2

    of     1