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 » Scripters
Home Search
 

Re: GroupAdmin Script help.

Previous Thread :: Next Thread 
james2012bond is not online. james2012bond
Joined: 11 Oct 2012
Total Posts: 68
04 Nov 2016 08:38 PM
So I have this script that allows someone on the admin list to open doors. The script uses CFrames to create animations for these doors. I plan to use this script of mine on a MASSIVELY large scale. I do not want to have to go through each part of the map, to each door's script and put in a name. I want it to automatically add someone to the admin list, if they are in my group. I know this function exists, but I'm just barely coming back to scripting and I cannot figure out how to do it. If you could, Please add to the script what I just mentioned, then link and/or comment the modified script below. Thanks!

Here is the script:

Admins = {"james2012bond"}

door1 = game.Workspace.TrainingDoors.Door1
door2 = game.Workspace.TrainingDoors.Door2
opened = false

function onChatted(msg)

if string.find(string.lower(msg), string.lower("open")) and
string.find(string.lower(msg), string.lower("blue")) then

if not opened then

opened = true

for i = 1, 29 do
wait(.025)
door1.CFrame = CFrame.new(door1.CFrame * Vector3.new(.4,0,0))
door2.CFrame = CFrame.new(door2.CFrame * Vector3.new(-.4,0,0))
end
end
end

if string.find(string.lower(msg), string.lower("close")) and
string.find(string.lower(msg), string.lower("blue")) then

if opened then

for i = 1, 29 do
wait(.025)
door1.CFrame = CFrame.new(door1.CFrame * Vector3.new(-.4,0,0))
door2.CFrame = CFrame.new(door2.CFrame * Vector3.new(.4,0,0))
end

opened = false

end
end
end

game.Players.PlayerAdded:connect(function (guy)
for i,v in pairs(Admins) do
if string.lower(guy.Name) == string.lower(v) then
guy.Chatted:connect(onChatted)
end
end
end)











Mr Bond
Report Abuse
triode is not online. triode
Joined: 13 Aug 2011
Total Posts: 5844
04 Nov 2016 08:44 PM
The fact that the solution is in this script means that you didn't make this.





Report Abuse
james2012bond is not online. james2012bond
Joined: 11 Oct 2012
Total Posts: 68
04 Nov 2016 08:47 PM
@tri

I did make this, a long time ago. I left, and have come back, to this game. I'm getting BACK into scripting. I wanted to improve this script. I just cant remember how. So if you could please stop being negative. That would be great. :)


Mr Bond
Report Abuse
Stereotypical_Nerd is not online. Stereotypical_Nerd
Joined: 08 Feb 2012
Total Posts: 2088
04 Nov 2016 08:57 PM
http://wiki.roblox.com/index.php?title=API:Class/ModuleScript


Report Abuse
triode is not online. triode
Joined: 13 Aug 2011
Total Posts: 5844
04 Nov 2016 08:59 PM
I'm not being negative, you are hurting yourself by reading what I am saying wrong:

look in your code and see how you would make it work with all the doors. Although I may add, if you have double doors you will run into a problem. Literally, look in your code and you will find a solution.




Report Abuse
james2012bond is not online. james2012bond
Joined: 11 Oct 2012
Total Posts: 68
05 Nov 2016 01:13 PM
Bump1


Mr Bond
Report Abuse
james2012bond is not online. james2012bond
Joined: 11 Oct 2012
Total Posts: 68
05 Nov 2016 08:32 PM
Bump2


Mr Bond
Report Abuse
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
05 Nov 2016 09:16 PM
http://wiki.roblox.com/index.php?title=API:Class/Player/IsInGroup
Report Abuse
james2012bond is not online. james2012bond
Joined: 11 Oct 2012
Total Posts: 68
07 Nov 2016 08:58 AM
Thanks man, that helps alot!


Mr Bond
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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