Attempt to concatenate nil with string

The text seems to be the problem?

remote.OnClientEvent:Connect(function(ability)
	
	gui.Enabled = true
	text = "Would you like to learn how to use"..ability.."?"
	abilityToGet = ability
	
	talking = true
	typewrite(label, text)
	talking = false
	yes.Visible = true
	no.Visible = true	
end)

check if ability exists first. Wrap the whole thing in:

if ability then

end

I forgot how to use this website someone give me an explanation help plz

You should probably check that ability is a String Value, especially if you’re attempting to concat it with a String Variable cause it may result back as an error with comparing a string to something else

-- I'd assume you have all of your outside variables set (gui, yes, no)

remote.OnClientEvent:Connect(function(ability)
    local StringConfirm = tostring(ability) --This returns back a string, or nil

    if StringConfirm then
        gui.Enabled = true
        
        local Text = "Would you like to learn how to use "..ability.."?"

        abilitytoGet = ability
        talking = true
        typewrite(label, text)
        talking = false

        yes.Visible = true
        no.Visible = true
    end
end)