Permissions Module Script
1 | local Module = { |
2 | [ "CanUse" ] = { "TheTravelingHermit" , "NeutronStarStudios" } |
3 | } |
4 | return Module |
I want to have multiple names in one Value.
1 | for i,p in pairs (VoiceTable) do |
2 |
3 | if speaker.Name = = p then |
4 | Voice Commands Here |
5 | end |
6 |
7 | end |
This doesn't work, I have the basics down, I just don't know how to have multiple names in the same Table Value. Please help!
Assuming that VoiceTable
is Module.CanUse, that should be fine.
A better alternative is to use a dictionary
1 | local Module = { |
2 | [ "CanUse" ] = { |
3 | TheTravelingHermit = true ; |
4 | NeutronStarStudios = true ; |
5 | } |
6 | } |
7 | return Module |
That way you can find out if somebody is in the CanUse table with the accessor
1 | PlayerCanUse = Module.CanUse [ Player.Name ] |