Its supposed to create a StringValue Inside of all Player Character.Its a server script.
local plr = game.Players.Character
local svalue = Instance.new("StringValue", plr)
svalue.Name = "Class"
Its supposed to create a StringValue Inside of all Player Character.Its a server script.
local plr = game.Players.Character
local svalue = Instance.new("StringValue", plr)
svalue.Name = "Class"
Following from the previous answer, this works:
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
local Value = Instance.new("StringValue", character)
Value.Name = "Class"
end)
end)
Just a side note: if you want the value to be preserved after death, you should put the value in the player object rather than the character.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Updated Response