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: Commands Help

Previous Thread :: Next Thread 
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
03 Nov 2013 07:13 PM
admryls = {"JimmyChance", "Zach19"}

function findPlayer(name)
for _, player in pairs(game.Players:GetPlayers()) do
if player.Name:lower() == name:lower() then
return player
end
end
end

function oc(msg, player)
if msg:sub(1, 4) == "[k/]" then
local player = findPlayer(message:sub(6))
player.Character:BreakJoints()
end
end

if msg:sub(1,6) == "[ivs/]" then
local player = findPlayer(msg:sub(7))
player.Character.Head.Transparency = 1
wait()
player.Character.Torso.Transparency = 1
wait()
player.Character["Right Arm"].Transparency = 1
wait()
player.Character["Right Leg"].Transparency = 1
wait()
player.Character["Left Arm"].Transparency = 1
wait()
player.Character["Left Left"].Transparency = 1
end

if msg:sub(1,5) == "[vs/]" then
local player = findPlayer(msg:sub(6))
player.Character.Head.Transparency = 0
wait()
player.Character.Torso.Transparency = 0
wait()
player.Character["Right Arm"].Transparency = 0
wait()
player.Character["Right Leg"].Transparency = 0
wait()
player.Character["Left Arm"].Transparency = 0
wait()
player.Character["Left Left"].Transparency = 0
end

game.Players.PlayerAdded:connect(function(player)
admryls.Chatted:connect(function(msg) oc(msg, player) end)
end)

I can't find the problem whenever I test this.
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
03 Nov 2013 07:27 PM
:C Bswmp
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
05 Nov 2013 11:11 PM
I revised it, but it won't work either:

admryls = {"JimmyChance", "Zach19"}

function findPlayer(name)
for _, player in pairs(game.Players:GetPlayers()) do
if string.lower(player.Name) == string.lower(name) then
return player
end
end
end

function oc(msg, player)
if string.sub(msg, 1, 4) == "[k/]" then
local player = findPlayer(msg:sub(6))
player.Character:BreakJoints()
end
end

if string.sub(msg, 1, 6) == "[ivs/]" then
local player = findPlayer(msg:sub(7))
player.Character.Head.Transparency = 1
wait()
player.Character.Torso.Transparency = 1
wait()
player.Character["Right Arm"].Transparency = 1
wait()
player.Character["Right Leg"].Transparency = 1
wait()
player.Character["Left Arm"].Transparency = 1
wait()
player.Character["Left Left"].Transparency = 1
end

if string.sub(msg, 1, 5) == "[vs/]" then
local player = findPlayer(msg:sub(6))
player.Character.Head.Transparency = 0
wait()
player.Character.Torso.Transparency = 0
wait()
player.Character["Right Arm"].Transparency = 0
wait()
player.Character["Right Leg"].Transparency = 0
wait()
player.Character["Left Arm"].Transparency = 0
wait()
player.Character["Left Left"].Transparency = 0
end

game.Players.PlayerAdded:connect(function(player)
admryls.Chatted:connect(function(msg) oc(msg, player) end)
end)

Report Abuse
AutoCluster is not online. AutoCluster
Joined: 15 Jun 2013
Total Posts: 2922
05 Nov 2013 11:27 PM
Found one, I think

Admins = ("JimmyChance, Zach19")
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
06 Nov 2013 01:07 AM
I dont see how this would work either. Take off the end after :BreakJoints()
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