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: Can someone fix this script please:

Previous Thread :: Next Thread 
XoDust is not online. XoDust
Joined: 23 Apr 2012
Total Posts: 1401
16 Apr 2013 10:32 PM
admins = {"Xodust","Offensively"}

function isAdmin(name)
for i,v in pairs(admins) do
if name:lower() == v:lower() then return true end
end
return false
end

function onChatted(msg, recipient, speaker)

local source = string.lower(speaker.Name)
msg = string.lower(msg)

if (msg == "Attack!" or "Banzai!") then
Game.Lighting.Part.Parent = Workspace

end

end

function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
end

game.Players.ChildAdded:connect(onPlayerEntered)






Everything after

admins = {"Xodust","Offensively"}

function isAdmin(name)
for i,v in pairs(admins) do
if name:lower() == v:lower() then return true end
end
return false
end



works but I don't know how to make the permission levels to only certain people

Please help
Report Abuse
ball360 is not online. ball360
Joined: 31 Mar 2009
Total Posts: 1557
16 Apr 2013 10:36 PM
What do you mean by permissions?

Report Abuse
XoDust is not online. XoDust
Joined: 23 Apr 2012
Total Posts: 1401
16 Apr 2013 10:36 PM
Sort of like admin commands

where only admins/people on a list can speak the command
Report Abuse
XoDust is not online. XoDust
Joined: 23 Apr 2012
Total Posts: 1401
16 Apr 2013 10:56 PM
bump
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
16 Apr 2013 10:58 PM
You never called the isAdmin function, assuming it works.

(╯°□°)> KMXD
Report Abuse
XoDust is not online. XoDust
Joined: 23 Apr 2012
Total Posts: 1401
16 Apr 2013 11:08 PM
Wait what?
Report Abuse
XoDust is not online. XoDust
Joined: 23 Apr 2012
Total Posts: 1401
16 Apr 2013 11:50 PM
bump
Report Abuse
adark is not online. adark
Joined: 13 Jan 2008
Total Posts: 6412
17 Apr 2013 12:48 AM
admins = {"Xodust","Offensively"}

function isAdmin(name)
for i,v in pairs(admins) do
if name:lower() == v:lower() then return true end
end
return false
end

function onChatted(msg, recipient, speaker)
if not IsAdmin(speaker) then return end --This will exit the function without executing any of the following code, so that only Players in the admin list can use the commands.

local source = string.lower(speaker.Name)
msg = string.lower(msg)

if (msg == "attack!" or "banzai!") then --Make sure you only use lowercase letters.
Game.Lighting.Part.Parent = Workspace

end

end

function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
end

game.Players.ChildAdded:connect(onPlayerEntered)
Report Abuse
yi18 is not online. yi18
Joined: 30 Aug 2010
Total Posts: 11443
17 Apr 2013 12:50 AM
Thank you a ton!
Report Abuse
XoDust is not online. XoDust
Joined: 23 Apr 2012
Total Posts: 1401
17 Apr 2013 03:50 PM
@adark

hmm not working
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