I get the error "Attempt to set parent of Players.BelgiumStorage to Players.BelgiumStorage.Backpack would result in circular reference"
LocalScript in StarterGui
local Storage = game.ServerStorage
local Sword = Storage.Sword
local Cane = Storage.Cane
function onPlayerAdded(player)
player.CharacterAdded:connect(function()
if player:GetRankInGroup(2972225) >= 253 then
game.ReplicatedStorage.ServerEvents.GiveToolsA:FireServer(player, Sword, Cane)
end
end)
end
for _, player in pairs(game.Players:GetPlayers()) do
onPlayerAdded(player)
end
game.Players.PlayerAdded:connect(onPlayerAdded)
Script in ServerScriptStorage
local function GiveToolsAdmin(Player, Sword, Cane)
Sword:Clone()
Cane:Clone()
Sword.Parent = Player.Backpack
Cane.Parent = Player.Backpack
end
game.ReplicatedStorage.ServerEvents.GiveToolsA.OnServerEvent:Connect(GiveToolsAdmin)
