Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I make it so only certain people get a hat and package when they join my game?

Asked by 11 years ago

How can I make it so only certain people get a hat and package when they join my game? For instance, if I want my friend to have the Dominus Messor and the Overseer package when he plays my games how would I do that?

1 answer

Log in to vote
0
Answered by 11 years ago

You could do something like this. I'm only going to give you the base of it so you can customize.

01game.Players.PlayerAdded:connect(function(player)
02ptable = {
03    "Person1",
04    "Person2"
05}
06 
07if ptable[x] == player.Name then
08    tool = game.ServerStorage.Tool
09    toolclone = tool:Clone(player)
10end

There's probably some mistakes but that's the base of it.

Another way (This goes in a localscript in the starterpack):

1game.Players.PlayerAdded:conect(function()
2    local player = game.Players.LocalPlayer
3    if player.Name == "Name1" or player.Name == "Name2" then
4        tool = game.ServerStorage.Tool
5        toolclone = tool:Clone(player.Backpack)
6end
7end)

The second way is probably more correct.

Hope I could help!

Ad

Answer this question