This is driving me nuts.
For some reason, this script keeps throwing an error saying that the "Changed" event on these values (more specifically as said in the output, the one at line 13) is a "nil value", even though it's right here on the Roblox Wiki:
local stats = script.Parent.Stats; local head = script.Parent.Head
local gender = stats.Gender; local name = stats.Name; local desc = stats.Description
gender.Changed:Connect(function()
if gender.Value == 1 then
head.NameGui.TextLabel.Text = name.Value.."?"
elseif gender.Value == 0 then
head.NameGui.TextLabel.Text = name.Value.."?"
end
end)
name.Changed:Connect(function()
if gender.Value == 1 then
head.NameGui.TextLabel.Text = name.Value.."?"
elseif gender.Value == 0 then
head.NameGui.TextLabel.Text = name.Value.."?"
end
end)
desc.Changed:Connect(function()
head.DescriptionGui.TextLabel.Text = desc.Value
end)
With my experience with the "Changed" event (on value instances, FYI), I've never received this error. Why is this happening, and how can I fix it?

1 comment
I won't make this a complete answer because it is more a shot in the dark. Are you sure that gender, name and desc exist? Check if they themselves are nil. Then it's a problem with how you access the objects. Just an idea.