01 | admins = { "iispear" , "Pep" , "Pep2" , "Pep3" } |
02 |
03 | function isPlayerAdmin (name) |
04 | for i,v in pairs (admins) do |
05 | if name = = v then |
06 | return true |
07 | end |
08 | end |
09 | end |
10 |
11 | function chatted(msg,rec) |
12 | if string.sub(msg, 1 , 5 ) = = "HSoulDrop" then |
13 | ----- |
14 | H --This is where i want the Progress to being so i have a union |
15 | E --Put in lighting that i want to be cloned and positioned infront |
Another script Layout For The admin I CAN NOT do it i tried everything how would i get a union in lighting cloned and infront of you
If this Counts as spam Am sorry !
Things like Models and Parts can no longer be stored in lighting; rather, it is much safer to store them in ServerStorage
. As the name implies, you should be accessing models and such in ServerStorage
using Scripts, not LocalScripts. A sample of using ServerStorage
(once again in a Script
) would be as follows...
1 | local model = game.ServerStorage.Model:Clone() -- makes a reference to the model "Model" in ServerStorage, clones it, and stores it to the variable "model" |
2 | -- visible properties, such as position, rotation, transparency, and such should be set here, before parenting it to the workspace. |
3 | model.Parent = workspace -- set the parent of the model to the workspace |
4 | -- more manipulation of model |
One last thing to note is that ServerStorage
does not work with just Models, it also works with Parts, Unions, Folders, and more.
I hope this helps! - Programmix
Just try the fixed code, I can explain it later.
01 | admins = { "iispear" , "Pep" , "Pep2" , "Pep3" } |
02 |
03 | function isPlayerAdmin(name) |
04 | for i,v in pairs (admins) do |
05 | if name = = v then |
06 | return true |
07 | end |
08 | end |
09 | end |
10 |
11 | function chatted(msg,rec) |
12 | if msg and string.sub(msg, 1 , 9 ) = = "HSoulDrop" then |
13 | ----- |
14 | H --This is where i want the Progress to being so i have a union |
15 | E --Put in lighting that i want to be cloned and positioned infront |
First, you don't need to use 'if msg' because there is no way there is no message when you chat. Second, if you are going to match messages like that, you might as well just use if msg=='HSouldDrop'because using string.sub with this is pretty useless. Yumtaste's version will work though.