|
| 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 |
|
|
|
| 01 Jan 2013 05:56 PM |
| It was working til I put in the "close door," command. |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2013 05:57 PM |
| Never mind.. >_> I see the mistake.... |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2013 05:57 PM |
| Fixed.. I spelled my name wrong............ -_-" |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
|
| 01 Jan 2013 06:18 PM |
'end' expected (to close 'if' at line 2) near 'else'
|
|
|
| Report Abuse |
|
|
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 |
|
|