Im trying to add a folder into the player so I can change certain things in there for my game only idk why it doesnt add a script into the player this is a local script inside of the starteplayerscripts
wait(1)
local player = game:GetService("Players").LocalPlayer
local character = player.Character
local function addfolder()
local itemsFolder = Instance.new("Folder")
itemsFolder.Name = "Items"
itemsFolder.Parent = player
end
game.Players.PlayerAdded:Connect(addfolder)
It’s because it’s a LocalScript. Anything done on the client, e.g. in a LocalScript, will only change for that client. You need to make the folder server-side, as well as edit it server-side, if you want it to not only change for that client.
local players = game:GetService("Players")
local function addFolder(player)
local folder = Instance.new("Folder")
folder.Name = "Items"
folder.Parent = player
end
players.PlayerAdded:Connect(addFolder)