I can clone my tool to the backpack but when I reset it will be gone someone said use a CharacterAdded but I have no idea how I should change my script to after I use CharacterAdded heres the script.
--Script made by WINDOWS10XPRO
--[[
Title: KeyCardManagerScript
Goal: Gives keycard to specific rank in a group when they join the server
Description: This script is made by WINDOWS10XPRO. It's an open source. You can copy it if you want to.
]]--
--Variables:
local GroupID = 7495829 -- Your GroupID here
local ReplicatedStorage = game:GetService("ReplicatedStorage") -- ReplicatedStorage
local BlueKeyCard = ReplicatedStorage.BlueKeyCard -- Your Item
local YellowKeyCard = ReplicatedStorage.YellowKeyCard -- Your Item
--Ranks:
local Chairman = 255 -- Your rank number here
local President = 19 -- Your rank number here
--Scripts:
game.Players.PlayerAdded:Connect(function(Player) -- This line checks if a player has joined the server, and player is an argument.
print(Player.Name .. " Has Joined The Server") -- Printing out the player's name in the Developer Console, press F9 if you're on pc.
if Player:GetRankInGroup(GroupID) == President then -- Checks if the player's rank is President
wait(1)
local YellowKeyCardClone = YellowKeyCard:Clone() -- Set a variable to clone the keycard
YellowKeyCardClone.Parent = Player:WaitForChild("Backpack") -- Set the keycard parent to the player's backpack
local CheckKeyCardInBackpack = Player:WaitForChild("Backpack"):FindFirstChild("YellowKeyCardClone")
if CheckKeyCardInBackpack then
print("Succesfully added!")
else
print("Cloning failed!")
end
elseif Player:GetRankInGroup(GroupID) == Chairman then -- Checks if the player's rank is Chairman
wait(1)
local BlueKeyCardClone = BlueKeyCard:Clone() -- Set a variable to clone the keycard
BlueKeyCardClone.Parent = Player:WaitForChild("Backpack")
local CheckKeyCardInBackpack = Player:WaitForChild("Backpack"):FindFirstChild("BlueKeyCardClone")
if CheckKeyCardInBackpack then
print("Succesfully added!")
else
print("Cloning failed!")
end
else
print("Did not join the group or don't have the rank requirement.")
end
end)
I will be calm if someone helped me out, thanks!

1 comment
I do can clone it using that script, but when I reset it is gone