#Commands

1 messages · Page 1 of 1 (latest)

fringe hornet
#

How do i do a command?
Like if you have now a command like :spawn and then a part goes invisible and the other command :unspawn that does the part visible agian
How do i do this?

Please tell me

versed basin
#
return function(Vargs)
    local server, service = Vargs.Server, Vargs.Service

    server.Commands.spawnthing = {
        Prefix = server.Settings.Prefix;
        Commands = {"thecommandname"};
        Args = {};
        Description = "command for wild";
        Hidden = false;
        Fun = false;
        AdminLevel = "Admins";
        Function = function(plr,args)
            game.Workspace:WaitForChild('Parts').thepart.Transparency=1
            game.Workspace:WaitForChild('Parts').thepart.CanCollide=false
        end
    }
    server.Commands.unspawnthing = {
        Prefix = server.Settings.Prefix;
        Commands = {"theothercommandname"};
        Args = {};
        Description = "command for wild";
        Hidden = false;
        Fun = false;
        AdminLevel = "Admins";
        Function = function(plr,args)
            game.Workspace:WaitForChild('Parts').thepart.Transparency=0
            game.Workspace:WaitForChild('Parts').thepart.CanCollide=true
        end
    }
end
#

Something like that

#

Name of plugin should be Server-Spawn Or Server: Spawn

fringe hornet
#

Thank you so much

versed basin
#

No Problem.

fringe hornet
#

But like now the name on game.workspace:waitforchild(„Parts“) should i rename it to the part i want or? / and .thepart. Should i rename it too?

versed basin
#

thepart

#

Waitforchild("Parts") is a folder

fringe hornet
#

A

#

So i should create a folder of it?

#

And .thepart. Should i reaname it too?

#

So like i insert the part and rename thge part and runn the command?

tawny wigeon
#

"spawnthing" - Command Name
"thecommandname" - Command Name that's displayed in Adonis, ex: (prefix)thecommandname
"game.Workspace:WaitForChild("Parts") - Folder "Parts" in Workspace
"thepart" - Part (name) in the Parts folder

#

So if your part is called "Part1" it would be Parts.Part1

fringe hornet
#

Ok

fringe hornet
#

but i wanna group the parts as a model but if i group it it comes a error how do i fix it?

fringe hornet
#

so if i have many parts right?

tawny wigeon
#

Yes?

fringe hornet
#

and i want to group them as model

tawny wigeon
#

Ah

fringe hornet
#

so i dont have to write every single part

#

but its says error every time i group it

#

aas model

tawny wigeon
#

one sec

fringe hornet
#

game.Workspace:WaitForChild('Parts').Part1.Transparency=1 game.Workspace:WaitForChild('Parts').Part1.CanCollide=false
game.Workspace:WaitForChild('Parts').Part2.Transparency=1
game.Workspace:WaitForChild('Parts').Part2.CanCollide=false
game.Workspace:WaitForChild('Parts').Part3.Transparency=1
game.Workspace:WaitForChild('Parts').Part3.CanCollide=false
game.Workspace:WaitForChild('Parts').Part4.Transparency=1
game.Workspace:WaitForChild('Parts').Part4.CanCollide=false
game.Workspace:WaitForChild('Parts').Part5.Transparency=1
game.Workspace:WaitForChild('Parts').Part5.CanCollide=false
game.Workspace:WaitForChild('Parts').Part6.Transparency=1
game.Workspace:WaitForChild('Parts').Part6.CanCollide=false

it would look like this

#

it would be easier to do as model

tawny wigeon
#

Are all of them going to be called "Part"?

fringe hornet
#

yea

tawny wigeon
#

return function(Vargs)
    local server, service = Vargs.Server, Vargs.Service

    server.Commands.spawnthing = {
        Prefix = server.Settings.Prefix;
        Commands = {"thecommandname"};
        Args = {};
        Description = "command for wild";
        Hidden = false;
        Fun = false;
        AdminLevel = "Admins";
        Function = function(plr,args)
            for i, v in pairs(game.Workspace:WaitForChild("Parts"):GetChildren()) do
                v.Transparency = 0
                    v.CanCollide = true
            end
        end
    }
    server.Commands.unspawnthing = {
        Prefix = server.Settings.Prefix;
        Commands = {"theothercommandname"};
        Args = {};
        Description = "command for wild";
        Hidden = false;
        Fun = false;
        AdminLevel = "Admins";
        Function = function(plr,args)
            for i, v in pairs(game.Workspace:WaitForChild("Parts"):GetChildren()) do
                v.Transparency = 1
                v.CanCollide = false
            end
        end
    }
end
#

try that

fringe hornet
#

alr

tawny wigeon
#

The "Parts" should be a Model

#

The name of the parts can be anything, since it uses :GetChildren()

#

It doesn't matter if all of them are named "Part(num)" or "Part"

fringe hornet
#

Ok thanks it worked

tawny wigeon
#

No problem

#

Anything else?

fringe hornet
#

yea

#

how do i do like if you join the game and a notification pops up?

#

thats my last one

fringe hornet
#

@tawny wigeon sorry for the ping if i annoy you right now

tawny wigeon
#

settings.OnJoin = {":notify all MessageHere"}

fringe hornet
#

Oh ok

tawny wigeon
#

OnJoin ignores admin level, meaning whenever someone joins regardless of level, it will run that command

fringe hornet
#

Ok thanks

#

Wait

tawny wigeon
#

?

#

alternatively you could do :notify me hi

#

hi being an example message

fringe hornet
#

how can i change the color of the gui? and the text

tawny wigeon
#

Oh that

fringe hornet
#

yea but on the default one not on aero

tawny wigeon
#

uh

fringe hornet
#

if you dont know its fine

tawny wigeon
#

I don't, but im sure others do

fringe hornet
#

Ok I’ll ask them

#

Do you know who would know it?

tawny wigeon
#

Wata probably

#

No idea

fringe hornet
#

Ok

#

@versed basin could you help for a sec?

versed basin
#

Custom Themes.

#

Mess around with colors in there you'll figure it out.

fringe hornet
#

what gui?

versed basin
#

Those I guess.

#

Haven't messed around with themes that much.

fringe hornet
#

Ok