Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would I get the string from an Instance?

So I know that when you use FilterStringAsync(), the returned value is an Instance. My question, however, is how would I get the string back from that Instance?

VoteStarting.OnServerEvent:Connect(function(player, title, option1, option2, option3, option4, option5)
	if title ~= nil then
		local fTitle = ts:FilterStringAsync(title, player.UserId)
	end
end)

Thank you for taking the time to read and look into this!

2 comments

0

cant you do Instance.Name?

0

wait nvm scratchthat

1 answer

✓ Accepted answer

In reality, I do not believe that you can do this. At least, I don't believe you can return a non-filtered version of the string.

If you look at the TextFilterResult returned by the TextService FilterStringAsync, you'll see it does have the ability to return the following:

GetChatForUserAsync

GetNonChatStringForBroadcastAsync

GetNonChatStringForUserAsync

None of which return a non-filtered version of the string that you decided to filter.

Though, you could return the filtered versions using these above functions.

There may be a way to do this that I am unaware of, but I am not finding it within the wiki article.

1 comment

0

Ok, thank you

This discussion is preserved as it was. New answers, comments, and votes are closed.