TextBox types double characters on iOS and also bugging out the iOS keyboard completly

I have looked at some similar posts but still no answear to this weird bug.

I have a simple textbox in my game and it works perfectly on PC but on my iPhone XR it bugs out completly, the keyboard is bugging out so when I for an example press on the letter “R” it will type out “RR” it will always double type the character I press. And also when you try to use backspace on the iOS keyboard it removes one character and instantly adds back the character you removed so its just a constant loop of removing and adding the removed character.

script.Parent.FocusLost:Connect(function()
	if script.Parent.Text == script.Parent.Text:sub(1,24) then
		local message = script.Parent.Text
		game.ReplicatedStorage.RoleplayEvents.RoleplayName:FireServer(message)
	end
end)

script.Parent.Changed:Connect(function()
	script.Parent.Text = script.Parent.Text:sub(1,24)
end)

probably something in the script firing multiple times, try addding a debounce