Why is it always equal to 0?
I've tried to make a script where you save the Values,** but, when i print the Value, it's always says the number 0...**
If i'm doing this wrong, or just put the Value creation in the wrong place, please tell me!
01 | Spotchoice = { nil ,game.ServerStorage.Leftbang,game.ServerStorage.Rightbang,game.ServerStorage.Straightbang,game.ServerStorage.Mohawk,game.ServerStorage.Leftbang } |
05 | local item = Spotchoice [ Index ] |
10 | player = script.Parent.Parent.Parent.Parent.Parent.Character |
12 | if player:FindFirstChild( "HairValue" ) = = nil then |
13 | HairValue = Instance.new( "NumberValue" ,player) |
14 | HairValue.Name = "HairValue" |
18 | print (HairValue.Value) |