of     1   

malliox12
#41424423Sunday, January 23, 2011 3:58 PM GMT

im making a script for the guardbots that roblox have that makes u the owner (3 different scripts edits everything to make u the owner) function CA(guy) wait(20) if workspace.GuardBot1.PlayerIdTag.Value == "0" then workspace.GuardBot1.PlayerIdTag.Value = guy.userId elseif workspace.GuardBot2.PlayerIdTag.Value == "0" then workspace.GuardBot2.PlayerIdTag.Value = guy.userId elseif workspace.GuardBot3.PlayerIdTag.Value == "0" then workspace.GuardBot3.PlayerIdTag.Value = guy.userId elseif workspace.GuardBot4.PlayerIdTag.Value == "0" then workspace.GuardBot4.PlayerIdTag.Value = guy.userId elseif workspace.GuardBot5.PlayerIdTag.Value == "0" then workspace.GuardBot5.PlayerIdTag.Value = guy.userId elseif workspace.GuardBot6.PlayerIdTag.Value == "0" then workspace.GuardBot6.PlayerIdTag.Value = guy.userId end end game.Players.ChildAdded:connect(CA)
HPtopia
#41425617Sunday, January 23, 2011 4:22 PM GMT

I prefer using if instead of all those elseif's but you need another end to close the function.
walter232
#41425750Sunday, January 23, 2011 4:24 PM GMT

game.Players.PlayerAdded:connect(function(Player) Player.CharacterAdded:connect(function() --Code here end) end)
benningtonguy
#41428457Sunday, January 23, 2011 5:15 PM GMT

@HP He had enough end's.
malliox12
#41437696Sunday, January 23, 2011 7:35 PM GMT

still not working D:
HPtopia
#41448244Sunday, January 23, 2011 9:49 PM GMT

Doesn't he need one for the function, for the if, and for the elseif's?
malliox12
#41484238Monday, January 24, 2011 3:56 PM GMT

only for function and if's
leolion113
#41484333Monday, January 24, 2011 4:00 PM GMT

Any output mal ?
Archimato
#41491558Monday, January 24, 2011 8:21 PM GMT

Workspace needs a capitalized 'W'.
leolion113
#41492419Monday, January 24, 2011 8:39 PM GMT

In this case that doesnt matter Arch, it will still work.
malliox12
#41575927Wednesday, January 26, 2011 7:33 PM GMT

nope, no output, it seems to run just fine
malliox12
#41575951Wednesday, January 26, 2011 7:34 PM GMT

just noticed sometihng... does the used id thingy need capital "U"?
Joneal
#41576088Wednesday, January 26, 2011 7:39 PM GMT

I have to ideas. 1. Is the value in the guard a Number Value or a string? It has quotes around it but I think the userId property is a number. 2. If your testing this in Solo Test Mode, your userId is 0.
malliox12
#41576845Wednesday, January 26, 2011 8:02 PM GMT

would this work? game.Players.PlayerAdded:connect(function(Player) Player.CharacterAdded:connect(function() if Workspace.GuardBot1.PlayerIdTag.Value == 0 then Workspace.GuardBot1.PlayerIdTag.Value = Player.userId elseif Workspace.GuardBot2.PlayerIdTag.Value == 0 then Workspace.GuardBot2.PlayerIdTag.Value = Player.userId elseif Workspace.GuardBot3.PlayerIdTag.Value == 0 then Workspace.GuardBot3.PlayerIdTag.Value = Player.userId elseif Workspace.GuardBot4.PlayerIdTag.Value == 0 then Workspace.GuardBot4.PlayerIdTag.Value = Player.userId elseif Workspace.GuardBot5.PlayerIdTag.Value == 0 then Workspace.GuardBot5.PlayerIdTag.Value = Player.userId elseif Workspace.GuardBot6.PlayerIdTag.Value == 0 then Workspace.GuardBot6.PlayerIdTag.Value = Player.userId end end) end)
Joneal
#41577072Wednesday, January 26, 2011 8:08 PM GMT

Possibly.
leolion113
#41578131Wednesday, January 26, 2011 8:34 PM GMT

Mal what value thing are you using ? StringValue, IntValue, etc ?
malliox12
#41611162Thursday, January 27, 2011 12:57 PM GMT

intvalue... does it make any difference then stringvalue?

    of     1