Unable to cast string to int64? Filtering Text

So not much detail, it fires a remote event (with text box text, basically messaging) but when i try to filter the text it gives me this “Unable to cast string to int64” error

I’ve been tryna figure this out by looking on other topics but I couldn’t find out.

afbeelding

Help?

2 Likes

You have to give the text first and then the userid

2 Likes

I already tried that, but then i get this.

afbeelding

afbeelding

1 Like

You need to get the string from TextFilterResult, try

stringval.Value = TextService:FilterStringAsync(Text, player.UserId):GetNonChatStringForBroadcastAsync()
2 Likes

It worked!

I’ve never head of this " :GetNonChatStringForBroadcastAsync()"

I will have to read about it.

There are 3 ways to get a filtered string based on what you need, I recommend reading this post someone made here to understand them and how FilterStringAsync works to an extent

1 Like