of     1   

24kgoldring
#36768219Tuesday, November 09, 2010 10:20 PM GMT

if string.sub(msg,1,8) == "Pawnzor/" then local player = findplayer(string.sub(msg,8),speaker) if player ~= 0 then for i = 1,#player do if player[i].Character ~= nil then local torso = player[i].Character:FindFirstChild("Torso") if torso ~= nil then Torso.Reflectance = 1 local Humanoid = player[i].Character:FindFirstChild("Humanoid") if Humanoid ~= nil then Humanoid.MaxHealth = 200 end end end end end end
somethingoranother
#36768299Tuesday, November 09, 2010 10:22 PM GMT

I can tell by the errors this has that it was taken from free models.
24kgoldring
#36768461Tuesday, November 09, 2010 10:25 PM GMT

Sorry, but it was created by me. I am not the best you know... Provide a hint on what needs fixxed ?
Emess
#36768494Tuesday, November 09, 2010 10:26 PM GMT

Does the output say anything?
crazypotato4
#36768569Tuesday, November 09, 2010 10:27 PM GMT

It's funny how you think 'player' is a model. For this script, findplayer would have to look like this function findplayer(stuff) return game.Players:getPlayers() end
24kgoldring
#36768791Tuesday, November 09, 2010 10:31 PM GMT

That works, I tried it with my taze/ function
24kgoldring
#36768960Tuesday, November 09, 2010 10:34 PM GMT

if string.sub(msg,1,5) == "taze/" then local player = findplayer(string.sub(msg,6),speaker) if player ~= 0 then for i = 1,#player do if player[i].Character ~= nil then local Humanoid = player[i].Character:FindFirstChild("Humanoid") if Humanoid ~= nil then Humanoid.PlatformStand = true end end end end end
24kgoldring
#36768997Tuesday, November 09, 2010 10:34 PM GMT

:)
24kgoldring
#36769187Tuesday, November 09, 2010 10:38 PM GMT

Bring My Post Up
crazypotato4
#36769223Tuesday, November 09, 2010 10:38 PM GMT

You fail.
24kgoldring
#36769351Tuesday, November 09, 2010 10:40 PM GMT

How is this? I am just trying to learn how this script command dont function at all, don't be trollin'.
24kgoldring
#36769559Tuesday, November 09, 2010 10:43 PM GMT

if string.sub(msg,1,8) == "Pawnzor/" then local player = findplayer(string.sub(msg,8),speaker) if player ~= 0 then for i = 1,#player do if player[i].Character ~= nil then local torso = player[i].Character:FindFirstChild("Torso") if torso ~= nil then Torso.Reflectance = 1 then local Humanoid = player[i].Character:FindFirstChild("Humanoid") if Humanoid ~= nil then Humanoid.MaxHealth = 200 end end end end end end This would fix the whole process? Aye?
24kgoldring
#36781271Wednesday, November 10, 2010 1:33 AM GMT

Bump
crazypotato4
#36781365Wednesday, November 10, 2010 1:34 AM GMT

I honestly don't understand why you continue to think that player is a TABLE. Please LEARN TO SCRIPT if you want to do stuff like this.
24kgoldring
#36781764Wednesday, November 10, 2010 1:40 AM GMT

*facepalm* This has worked for the whole admin script, this ONE command is broken...
24kgoldring
#36781834Wednesday, November 10, 2010 1:42 AM GMT

"Please LEARN TO SCRIPT if you want to do stuff like this." Wth do you think I am doing? I am trying to learn. But your pushing me away.
underdog8600
#36783214Wednesday, November 10, 2010 2:04 AM GMT

Im not a good scripter but if this is an add-on to a Person299 command script try this if string.sub(msg,1,8) == "Pawnzor/" then local player = findplayer(string.sub(msg,9),speaker) if player ~= 0 then for i = 1,#player do if player[i].Character ~= nil then local torso = player[i].Character:FindFirstChild("Torso") if torso ~= nil then Torso.Reflectance = 1 then local Humanoid = player[i].Character:FindFirstChild("Humanoid") if Humanoid ~= nil then Humanoid.MaxHealth = 200 end end end end end end the second (msg,#) has to be 1 more then the first. (I noticed this on all of the commands)
24kgoldring
#36784393Wednesday, November 10, 2010 2:23 AM GMT

We'll give it a try.
crazypotato4
#36784545Wednesday, November 10, 2010 2:25 AM GMT

You don't learn to script by doing stuff like this. You learn how to script by starting simple, learning the essentials of scripting (loops, conditionals, functions, tables, etc.) and experimenting on your own. Not by modding Person299's commands.
underdog8600
#36785118Wednesday, November 10, 2010 2:34 AM GMT

I did start small. I just kinda know how the command script works.
IdiomicLanguage
#36787013Wednesday, November 10, 2010 3:11 AM GMT

Here it is fixed: if string.sub(msg,1,8) == "Pawnzor/" then local player = findplayer(string.sub(msg,8),speaker) if player ~= nil then char = player.Character if char ~= nil then torso = char.Torso if torso ~= nil then torso.Reflectance = 1 humanoid = char.Humanoid if humanoid ~= nil then humanoid.MaxHealth = 200 end end end end end end Here is what you did wronge, and some tips: 1.) you do not need to use a Function to find a child of some thing unless it has a space in the name. FindFirstChild is most useful for it's recursive function. to learn more about FindFirstChild() Search "FindFirstChild" on the search box in the middle left on roblox help wiki (http://wiki.roblox.com/index.php/Roblox) 2.)FindPlayer(msg, recep.) I do not will not return a table. instead it will return a single player, that there is not need to use table functions on and will glitch the script, because it gives you an object (the player) and not a table (group) of opjects. table[Num] is used to select a cirten object/value from the table, in a numeric range. 3.)You had declared "torso" as your variable, but called it as "Torso". Watch your capitals, as they do make a diffrence. 4.)You had said "if player ~= 0 then", as if impling that player is a Numberic value. If player was a table, as you where thinking it was, you would say ether "if player ~= nil then" or "if table.len(player) ~= 0 then". first to see if the table was there, and the latter to see if the table had any values inside of it. sence player is an object, we can only see if it is there, useing the first. 5.)You might be able to use local variables to select a objects, however I advise agenst it. If you do, you could run into multiple errors in other scripts. instead, try only to use local variables only to manipulate number that wont go any where out side of the script. I also perscripe some reading in the already explained help wiki page, but searching "Local Variables". 6.)Please also be awar the you are calling on a function. "findplayer(stringName, speaker)" is not a global function, so make sure you include what that is some where in your script. if string.sub(msg,1,8) == "Pawnzor/" then local player = findplayer(string.sub(msg,8),speaker) if player ~= 0 then for i = 1,#player do if player[i].Character ~= nil then local torso = player[i].Character:FindFirstChild("Torso") if torso ~= nil then Torso.Reflectance = 1 then local Humanoid = player[i].Character:FindFirstChild("Humanoid") if Humanoid ~= nil then Humanoid.MaxHealth = 200 end end end end end end
IdiomicLanguage
#36787105Wednesday, November 10, 2010 3:13 AM GMT

Btw, that last bit at the end it what I had looked at and edited. Note: I did NOT Debug my solution, but it should make enugh sence now to be able to debug it your self if there is any errors. Just make sure to debug it with the "findplayer" function aswell.
bloob827
#36787260Wednesday, November 10, 2010 3:16 AM GMT

@dark You have one too many ends.
bloob827
#36787496Wednesday, November 10, 2010 3:22 AM GMT

How boutyou trythis? function onChatted(msg,speaker) msg=msg:lower() speaker=speaker.Name:lower() if string.sub(msg,1,8) == "pawnzor/" then local player = findplayer(string.sub(msg,8),speaker) if player ~= nil then char = player.Character if char ~= nil then torso = char.Torso if torso ~= nil then torso.Reflectance = 1 humanoid = char.Humanoid if humanoid ~= nil then humanoid.MaxHealth = 200 end end end end end end function onNew(newPlayer) newPlayer.Chatted:connect(function(msg) onChatted(msg,speaker) end) end game.Players.ChildAdded:connect(onNew)

    of     1