of     1   

cool12309
#31291101Tuesday, August 10, 2010 1:55 AM GMT

*I had to change title to get attention. Rest is same.* Commands. This is failing. No output. Help? if string.sub(msg, 6, 14) == "teleport " then said = string.sub(msg, 15) local placeHolder = nil for i = (said + 1), string.len(msg) do if string.sub(msg, i, i + 1) == " " then placeHolder = i break end end placeHolder = game.Players[string.find(string.lower(placeHolder.Name), msg)] look = game.Players:GetChildren() for i = 1, #look do if string.find(string.lower(look[i].Name), said) == 1 then SPL = Instance.new("SelectionPartLasso") SPL.Color = BrickColor.new("Really black") SPL.Humanoid = look[i].Character.Humanoid SPL.Name = "SPL" SPL.Parent = Workspace SPL.Part = Pet SPL.Visible = true wait((math.pi*2)/10) SPL:Remove() look[i].Character.Torso.CFrame = placeHolder.Torso.CFrame end end end
OBF
#31291214Tuesday, August 10, 2010 1:57 AM GMT

You need a function if that's the whole script.
LPGhatguy
Forum Moderator
#31291241Tuesday, August 10, 2010 1:57 AM GMT

Alright! I'm working on it, please hold.
cool12309
#31291252Tuesday, August 10, 2010 1:57 AM GMT

It's not, it's part of one.
LPGhatguy
Forum Moderator
#31291430Tuesday, August 10, 2010 1:59 AM GMT

if string.sub(msg, 6, 14) == "teleport " then said = string.sub(msg, 16) local placeHolder for i = (said + 1), string.len(msg) do if string.sub(msg, i, i + 1) == " " then placeHolder = i break end end placeHolder = game.Players[string.find(string.lower(placeHolder.Name), msg)] look = game.Players:GetChildren() for i = 1, #look do if string.find(string.lower(look[i].Name), said) == 1 then SPL = Instance.new("SelectionPartLasso") SPL.Color = BrickColor.new("Really black") SPL.Humanoid = look[i].Character.Humanoid SPL.Name = "SPL" SPL.Parent = Workspace SPL.Part = Pet SPL.Visible = true wait((math.pi*2)/10) SPL:Remove() look[i].Character.Torso.CFrame = placeHolder.Torso.CFrame end end end Unless you wanted your command to be "teleportLPGhatguy", you need to change where you start checking for the string.
cool12309
#31292045Tuesday, August 10, 2010 2:07 AM GMT

Fail. No output. if string.sub(msg, 6, 14) == "teleport " then said = string.sub(msg, 15) local placeHolder for i = said, string.len(msg) do if string.sub(msg, i, i + 1) == " " then placeHolder = i break end end placeHolder = game.Players[string.find(string.lower(placeHolder.Name), msg)] look = game.Players:GetChildren() for i = 1, #look do if string.find(string.lower(look[i].Name), said) == 1 then SPL = Instance.new("SelectionPartLasso") SPL.Color = BrickColor.new("Really black") SPL.Humanoid = look[i].Character.Humanoid SPL.Name = "SPL" SPL.Parent = Workspace SPL.Part = Pet SPL.Visible = true wait((math.pi*2)/10) SPL:Remove() look[i].Character.Torso.CFrame = placeHolder.Character.Torso.CFrame end end end
LPGhatguy
Forum Moderator
#31292145Tuesday, August 10, 2010 2:08 AM GMT

Ah, I failed there. Because this is a little bit lengthy, and I don't feel like rewriting it because I'm tired, try writing it again without reference. But remember - start small, and build up.

    of     1