generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Why doesnt this work?

Previous Thread :: Next Thread 
are31 is not online. are31
Joined: 09 Nov 2007
Total Posts: 13767
15 Oct 2012 09:18 PM
elseif (string.sub(msg,1,5)) == "hats_" then
pl = msg:sub(6)
if (game.Players:FindFirstChild(pl)) then
obj = workspace.bluesteel:Clone()
obj.Parent = pl.Character
obj.AttachmentPos = Vector3.new(0, -0.3, 0)
ob = workspace.bluesteels:Clone()
ob.Parent = pl.Character
ob.AttachmentPos = Vector3.new(0, .3, 0)
o = workspace.knight:Clone()
o.Parent = pl.Character
o.AttachmentPos = Vector3.new(0, 0.35, 0)
end

I don't know why it doesn't work, I might have made a quick error.
I think has something to do with this pl = msg:sub(6)
and the pl.Character's
Report Abuse
are31 is not online. are31
Joined: 09 Nov 2007
Total Posts: 13767
15 Oct 2012 09:21 PM
bump
Report Abuse
are31 is not online. are31
Joined: 09 Nov 2007
Total Posts: 13767
15 Oct 2012 09:42 PM
bump2
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
15 Oct 2012 09:43 PM
What is msg.
Report Abuse
TeamBIuesteeI is not online. TeamBIuesteeI
Joined: 14 Oct 2012
Total Posts: 4
15 Oct 2012 09:44 PM
(im are)

function onChatted(msg)
Report Abuse
TeamBIuesteeI is not online. TeamBIuesteeI
Joined: 14 Oct 2012
Total Posts: 4
15 Oct 2012 09:47 PM
bump
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
15 Oct 2012 09:48 PM
No connection line.
Report Abuse
TeamBIuesteeI is not online. TeamBIuesteeI
Joined: 14 Oct 2012
Total Posts: 4
15 Oct 2012 09:49 PM
If you really want the whole script:

local adminlist = {"are31","Scriptos","lork","ccmetro545","sammybrotha","2lego10179","supergotenksss3","TeamBiuesteel","TeamBiuesteei"}


--sammybrotha","2lego10179","supergotenksss3

function onChatted(msg)
if (string.sub(msg,1,10)) == "tele_blue_" then
pp = msg:sub(11)
if (game.Players:FindFirstChild(pp)) then
if game.Players[pp].Character.Torso then
game.Players[pp].Character.Torso.CFrame = workspace.Tele1.CFrame + Vector3.new(0,5,0)
end
end
elseif (string.sub(msg,1,5)) == "hats_" then
pl = msg:sub(6)
if (game.Players:FindFirstChild(pl)) then
obj = workspace.bluesteel:Clone()
obj.Parent = pl.Character
obj.AttachmentPos = Vector3.new(0, -0.3, 0)
ob = workspace.bluesteels:Clone()
ob.Parent = pl.Character
ob.AttachmentPos = Vector3.new(0, .3, 0)
o = workspace.knight:Clone()
o.Parent = pl.Character
o.AttachmentPos = Vector3.new(0, 0.35, 0)
end
elseif (string.sub(msg,1,12)) == "tele_orange_" then
play = msg:sub(13)
if (game.Players:FindFirstChild(play)) then
if game.Players[play].Character.Torso then
game.Players[play].Character.Torso.CFrame = workspace.Tele2.CFrame + Vector3.new(0,5,0)
end
end
elseif (string.sub(msg,1,11)) == "create_orbs" then
game.Workspace.stand.Transparency = 0
game.Workspace.OrangeO.Transparency = 0.5
game.Workspace.walle.CanCollide = false
game.Workspace.stand1.Transparency = 0
game.Workspace.BlueO.Transparency = 0.5
game.Workspace.wallee.CanCollide = false
elseif (string.sub(msg,1,11)) == "remove_orbs" then
game.Workspace.stand.Transparency = 1
game.Workspace.stand1.Transparency = 1
game.Workspace.walle.CanCollide = true
game.Workspace.wallee.CanCollide = true
game.Workspace.BlueO.Transparency = 1
game.Workspace.OrangeO.Transparency = 1
elseif (string.sub(msg,1,5)) == "foul_" then
fo = msg:sub(6)
if (game.Players:FindFirstChild(fo)) then
if game.Players[fo].Character.Torso then
game.Players[fo].Character.Torso.CFrame = workspace.foul1.CFrame + Vector3.new(0,5,0)
m = Instance.new("Message", workspace)
m.Text = game.Players[fo].Name .." has been given a foul."
wait(2)
workspace.Message.Parent = nil
end
end
--workspace.door1.CFrame = workspace.door1.CFrame + Vector3.new(0,-15,0)
elseif (string.sub(msg,1,10)) == "open_water" then
for i = 1,50 do
workspace.door1.CFrame = workspace.door1.CFrame + Vector3.new(0,1,0)
workspace.door2.CFrame = workspace.door2.CFrame + Vector3.new(0,1,0)
workspace.door3.CFrame = workspace.door3.CFrame + Vector3.new(0,1,0)
workspace.door4.CFrame = workspace.door4.CFrame + Vector3.new(0,1,0)
wait()
end
elseif (string.sub(msg,1,11)) == "close_water" then
for i = 1,50 do
workspace.door1.CFrame = workspace.door1.CFrame + Vector3.new(0,-1,0)
workspace.door2.CFrame = workspace.door2.CFrame + Vector3.new(0,-1,0)
workspace.door3.CFrame = workspace.door3.CFrame + Vector3.new(0,-1,0)
workspace.door4.CFrame = workspace.door4.CFrame + Vector3.new(0,-1,0)
wait()
end


end
end

game.Players.ChildAdded:connect(function(player)
for i = 1,#adminlist do
if (string.lower(adminlist[i]))==string.lower(player.Name) then
player.Chatted:connect(function(ms) onChatted(ms) end)
end end end)
Report Abuse
TeamBIuesteeI is not online. TeamBIuesteeI
Joined: 14 Oct 2012
Total Posts: 4
15 Oct 2012 10:10 PM
elseif (string.sub(msg,1,5)) == "hats_" then
pl = msg:sub(6)
if (game.Players:FindFirstChild(pl)) then
obj = workspace.bluesteel:Clone()
obj.Parent = game.Players[pl].Character
obj.AttachmentPos = Vector3.new(0, -0.3, 0)
ob = workspace.bluesteels:Clone()
ob.Parent = game.Players[pl].Character
ob.AttachmentPos = Vector3.new(0, .3, 0)
o = workspace.knight:Clone()
o.Parent = game.Players[pl].Character
o.AttachmentPos = Vector3.new(0, 0.35, 0)
end

Got this so far.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image