You've got a bit mixed up with your "value" variables.
On line 4, you declare "value" as script.Parent.Value, I think that this is an IntValue? Meaning that the stored variable will be an integer.
You then try to change the value of the integer variable, which of course, there is none.
You will want:
game:GetService('Players').PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character:WaitForChild("Humanoid").Died:connect(function()
local value = script.Parent
value.Value = math.random(1,10)
if value.Value == 6 then
script.Parent.Parent.ScreenGui.NewItem.GreenSaber.Visible = true
end
end)
end)
end)
Unless you need the IntValue's value, I'd recommend using the following script and assigning a local variable instead:
game:GetService('Players').PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character:WaitForChild("Humanoid").Died:connect(function()
local value = math.random(1,10)
if value == 6 then
script.Parent.Parent.ScreenGui.NewItem.GreenSaber.Visible = true
end
end)
end)
end)