Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

It's not creating a StringValue?

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"

1 comment

0

Updated Response

1 answer

✓ Accepted answer

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.