Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I check if a string value has a value assigned to it?

Asked by
Jexpler 63
5 years ago

So I want to assign a value to my string value if no value has been assigned to it yet.

tool.AncestryChanged:Connect(function(c, p)
    if p:FindFirstChild('Humanoid') then
        if tool.PN.Value == " " then
            tool.PN.Value = p.Name
        end
    end
end)

That's all I could think of, and it doesn't work.

1 answer

Log in to vote
1
Answered by 5 years ago
tool.AncestryChanged:Connect(function(c, p)
    if p:FindFirstChild('Humanoid') then
        if tool.PN.Value == "" then
            tool.PN.Value = p.Name
        end
    end
end)

its if tool.PN.Value == "" then notif tool.PN.Value == " " then

Ad

Answer this question