Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I give tools to someone in a group with a certain rank?

local groupId = 2694395

local tool = game.ServerStorage.[SCP] Card-L3
 
function onPlayerSpawned(player)
  if player:IsInGroup(groupId) == 54 then
    tool:Clone().Parent = player.Backpack
  end
end
 
game.Players.PlayerAdded:connect(function(player)
  player.CharacterAdded:connect(function()
    onPlayerSpawned(player)
  end)
end)

I tried this, but it didn't work and I need to have it with multiple give scripts. How do I do it?

1 comment

0

Editted for Code Block.

2 answers

I might see the problem.

You might have done a mistake on this line:

local tool = game.ServerStorage.[SCP] Card-L3

As you can see, you have a space in the tools name. If you have a space and you are going to path to it, do this instead.

local tool = game.ServerStorage["[SCP] Card-L3"]

This will do the same thing, but allow spaces in the name.

Make a Model of all the tools you need, Then put it in lightning and clone the tools into the inventory. If you need a script for it, pm me.

This discussion is preserved as it was. New answers, comments, and votes are closed.