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

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

Asked by 8 years ago
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?

0
Editted for Code Block. M39a9am3R 3210 — 8y

2 answers

Log in to vote
1
Answered by
joalars2 107
8 years ago

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.

Ad
Log in to vote
0
Answered by 8 years ago

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.

Answer this question