Hello everyone, I have this script that creates values for guns and leaderstats:
game.Players.PlayerAdded:Connect(function(plr)
local leaderstats = Instance.new("Folder", plr)
leaderstats.Name = "leaderstats"
local money = Instance.new("IntValue", leaderstats)
money.Name = "Credits"
local guns = Instance.new("Folder", plr)
guns.Name = "Guns"
local bowcaster = Instance.new("BoolValue", guns)
bowcaster.Name = "Bowcaster"
print(bowcaster.Name)
local charric = Instance.new("BoolValue", guns)
bowcaster.Name = "Charric"
end)
But then something really weird happens, even though the print prints the correct name I get this: