Unable to cast string to int64 Error

  1. What do you want to achieve? Keep it simple and clear!

Hello, I am trying to make a filter-check button that checks if the text input inside a Textbox is filtered by using text services and remote functions.

  1. What is the issue? Include screenshots / videos if possible!

I always get this error:

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I looked over other posts but none of the solutions helped me fix this issue.



local GetFilteredMessage = ReplicatedStorage.Remotes:WaitForChild("GetFilteredMessage");
local filter = GetFilteredMessage:InvokeServer(Note.TextBox.Text, localplayer.UserId);

if filter then
    Note.Preview.Text = filter;
    Note.Preview.TextColor3 = Color3.fromRGB(80, 140, 80);
    Note.Preview.Text = "Filtering failed.";
    Note.Preview.TextColor3 = Color3.fromRGB(140, 40, 40);


local GetFilteredMessage = ReplicatedStorage.Remotes.GetFilteredMessage

local function FilterMessage(Message, PlayerID)
    local filterResult = ""
    filterResult = TextService:FilterStringAsync(Message, PlayerID):GetNonChatStringForBroadcastAsync()
    return filterResult

Note: Please let me know if you need any other information.

Can we see the full scripts. Also I’m pretty sure the error is because you forgot to take in the `Player parameter in your remote event.

Should be:
local function FilterMessage(Player, Message, PlayerID)

1 Like