i just used the .Name to name a folder I made the same as the name of a player:
local f function onPlayerEntered(player) f = Instance.new("Folder") f.Name = player f.Parent = game.Lighting print("Folder created") end game.Players.PlayerAdded:connect(onPlayerEntered)
But when I start the server outputs: 17:46:07.681 - Workspace.Main.Script:7: bad argument #3 to 'Name' (string expected, got Object)
why does it do this and how can I fix it?
local f function onPlayerEntered(player) f = Instance.new("Folder") f.Name = player.Name --use the name property f.Parent = game.Lighting print("Folder created") end game.Players.PlayerAdded:connect(onPlayerEntered)