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
 

Chat commands..?

Previous Thread :: Next Thread 
ThePyromaticBeast is not online. ThePyromaticBeast
Joined: 26 Dec 2012
Total Posts: 197
01 Jan 2013 05:53 PM
game.Players.PlayerAdded:connect(function(plr)
if plr.Name == "ThePyromaticBeast" then
plr.Chatted:connect(function(msg)
if msg:sub(1,9) == "open door" then
--p = game.Players:findFirstChild(msg:sub(6))
--if p then
--p.Character.Left Leg:Destroy()

x = game.Workspace.Door2
x.CanCollide = false
x.Transparency = 1

else if msg:sub(1,10) == "close door" then

x.CanCollide = true
x.Transparency = 0

end

end
end)
end
end)
print("workin script!")

Stumped..
Report Abuse
ThePyromaticBeast is not online. ThePyromaticBeast
Joined: 26 Dec 2012
Total Posts: 197
01 Jan 2013 05:56 PM
It was working til I put in the "close door," command.
Report Abuse
ThePyromaticBeast is not online. ThePyromaticBeast
Joined: 26 Dec 2012
Total Posts: 197
01 Jan 2013 05:57 PM
Never mind.. >_> I see the mistake....
Report Abuse
ThePyromaticBeast is not online. ThePyromaticBeast
Joined: 26 Dec 2012
Total Posts: 197
01 Jan 2013 05:57 PM
Fixed.. I spelled my name wrong............ -_-"
Report Abuse
noah is online. noah
Joined: 11 Sep 2006
Total Posts: 18977
01 Jan 2013 05:59 PM
open = false
game.Players.PlayerAdded:connect(function(plr)
if plr.Name == "ThePyromaticBeast" then
plr.Chatted:connect(function(msg)
if msg:sub(1,9) == "open door" then
if open == false then
open = true
x = game.Workspace.Door2
x.CanCollide = false
x.Transparency = 1

if msg:sub(1,10) == "close door" then
if open == true then
open = false
x.CanCollide = true
x.Transparency = 0
end
end
end
end
end)
end
end)
print("workin script!")
Report Abuse
ThePyromaticBeast is not online. ThePyromaticBeast
Joined: 26 Dec 2012
Total Posts: 197
01 Jan 2013 06:15 PM
game.Players.PlayerAdded:connect(function(plr)
if plr.Name == "ThePyromaticBeast" then
plr.Chatted:connect(function(msg)
if msg:sub(1,14) == "open holo door" then
--p = game.Players:findFirstChild(msg:sub(6))
--if p then
--p.Character.Left Leg:Destroy()

x = game.Workspace.Door2
x.CanCollide = false
x.Transparency = 1
end
end)

else if msg:sub(1,15) == "close holo door" then

x.CanCollide = true
x.Transparency = 0

end
else if msg:sub(1,7) == "delimb/" then
p = game.Players:findFirstChild(msg:sub(8))
if p then

local ll = p:findFirstChild("Left Leg")
local rl = p:findFirstChild("Right Leg")
local la = p:findFirstChild("Left Arm")
local ra = p:findFirstChild("Right Arm")
ll:remove()
rl:remove()
la:remove()
ra:remove()
end
end


end


end)
print("workin script!")
Report Abuse
ThePyromaticBeast is not online. ThePyromaticBeast
Joined: 26 Dec 2012
Total Posts: 197
01 Jan 2013 06:18 PM
'end' expected (to close 'if' at line 2) near 'else'
Report Abuse
ninja5566 is not online. ninja5566
Joined: 14 Jan 2009
Total Posts: 5233
01 Jan 2013 06:21 PM
game.Players.PlayerAdded:connect(function(plr)
if plr.Name == "ThePyromaticBeast" then
plr.Chatted:connect(function(msg)
if msg:sub(1,14) == "open holo door" then
--p = game.Players:findFirstChild(msg:sub(6))
--if p then
--p.Character.Left Leg:Destroy()

x = game.Workspace.Door2
x.CanCollide = false
x.Transparency = 1

elseif msg:sub(1,15) == "close holo door" then

x.CanCollide = true
x.Transparency = 0
elseif msg:sub(1,7) == "delimb/" then
p = game.Players:findFirstChild(msg:sub(8))
if p then

local ll = p:findFirstChild("Left Leg")
local rl = p:findFirstChild("Right Leg")
local la = p:findFirstChild("Left Arm")
local ra = p:findFirstChild("Right Arm")
ll:remove()
rl:remove()
la:remove()
ra:remove()
end end end) end end)
print("workin script!")
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