game.Players.PlayerAdded:connect(function(p) local stats = Instance.new("IntValue", p) stats.Name = "leaderstats" local money = Instance.new("StringValue", stats) money.Name = "test" money.Value = "gunA"
if game.Players.LocalPlayer.leaderstats.test == "gunA" then game.Workspace.Baseplate.Color = BrickColor.White() end end)
the brick color does not change and no output of the studio??? why is this and how to fix this?
You're trying to compare the test stringValue to "gunA". You should be checking the value instead, so this line:
if game.Players.LocalPlayer.leaderstats.test == "gunA" then
should be
if game.Players.LocalPlayer.leaderstats.test.Value == "gunA" then