local players = game:GetService("Players")
local sS = game:GetService("ServerStorage")
players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local playerfolder = Instance.new("Folder")
playerfolder.Parent = sS:WaitForChild("PlayerAccessoryStorage")
end)
end)
players.PlayerRemoving:Connect(function(player)
local char = player.Character or player.CharacterAdded:Wait()
local plrFolder = sS:WaitForChild("PlayerAccessoryStorage"):FindFirstChild(player.Name)
plrFolder:Destroy()
end)
I’m trying to make it so when a player joins, a folder with their name gets created so when needed, their accessories are saved there. However, it won’t work for some reason.